Problem 7.11 (Computing Deviation) page 278. Write your program to read a data file. You’ll prompt for a filename and you’ll use that name to open and read a data file. Assume the data file has an integer as its first number that indicates the number of data points that follow in the file.
Make sure you use the Application Template so you can process multiple data files. Code as many methods as you can that make sense to create this application.
Write an application that calculates the sin(x). The
sin(x) can be calculated using the following series:
A program consisting of only a main method will not get you a passing grade.
You must break up your logic into as many methods as necessary to solve this
problem. The more methods, the better the grade.
At the very minimum, for each run of the logic, you will prompt the user for
x (in degrees). Remember, the series requires x to be in radians.
(Use Math.PI / 180 as your conversion factor.) You will also prompt the
user for the number of terms to calculate in the series. You’ll output
your series calculation, as well as Math.sin(x), and the difference between the
two values to see how close your calculation is.
At the end of your logic, you’ll ask the user if they want to repeat the
Your grade will be based on the following criteria:
how much of the application is finished
whether it works
if you coded methods
the number of methods
if you formatted the output values using the printf method (assume just 6 decimal places for the output display)
An SSN can have OPTIONAL HYPHENS! But if they are there, they both need to be in their proper spots. So 123456789 and 123-45-6789 are both valid SSNs.
DO NOT USE LOOPS. We haven’t studied them yet. If you know loops, this problem will give you an appreciation for them.
Use the methods discussed in Chapter 4 as much as possible!
To avoid deep nesting of if statements, use a boolean variable and expressions that look like:
boolean isValid = true;
isValid = isValid && character1 is a digit;
isValid = isValid && character2 is a digit;
. . .
Just to give yourself confidence in the expressions involving isValid, write the program assuming an SSN only has 2 digits. Extending to 9 digits would be trivial. Adding optional hypen logic would then be marginally harder.
Problem: Determine if an entered point is in the Quarter Circle located in the first quadrant of the xy plane. Note you’ll have to prompt for the radius of the circle as well. Error check issues that might arise when a careless user enters bad data.
Create a program that inputs the 3 sets of 2 inputs needed to calculate Actual Temperature, Dewpoint, and Relative Humidity. For instance, entering Actual Temperature and Dewpoint will calculate the corresponding Relative Humidity. Entering Actual Temperature and Relative Humidity, calculates Dewpoint. Finally, entering Dewpoint and Relative Humidity, allows calculation of Actual Temperature.
Use the Scanner class for your input. To be clear, you will submit just one program that will have a total of 6 input methods and 3 calculations and outputs.
The college has a new program called Supplemental Instruction (SI). Through this program, you will have the opportunity to meet weekly with our SI Leader, who will provide weekly review sessions for all interested students. The Leader is a current student who has recently taken the course and done well. They will be in class with you every day, hearing what you hear, and reading what you read. During each review session, you will have a chance to get together with your classmates to compare notes, discuss concepts that might be confusing, review material for tests and quizzes, and ask any questions that you might have.
Sessions will begin the week of September 11th, and run through the end of the semester. You can attend as many review sessions as you like; each one will be different because you will have new material to discuss. SI sessions are informal – bring any notes you have, your textbook, or a classmate! By coming to these sessions, you will be able to develop a better understanding of the course content as well as more effective ways of learning.
If you are unable to attend the group session, but would like to meet with the SI Leader, you can set up an individual time to meet with them. You can let them know you would like to make an appointment with them when you see them in class, or feel free to send them a note through their college email.
I am thrilled that we have this new opportunity for you, and I am hopeful that you take advantage of this program.
An optional resource but highly suggested supplement for this course. I’ll be using this video series to supplement my lectures. I’ll also be using the videos as the basis for an online Intro to Java course that will hopefully be running Spring 2019:
SetJavaPathV5.vbs — This utility will set the Environment PATH variable to include the directory where the JDK is located. This utility is handy when running the JDK tools from the command line. Just download it, unzip the vbs file, and click it. It will probably take awhile for the program to find the JDK, so be patient!
All course announcements and correspondence will be done through this page. It is your responsibility to visit this course page at least once every two days to view the latest course announcements, homework, and news. It is unacceptable to say that you are not aware of something happening in the course.