Be on schedule.Score better.

support@savemydegree.com

# Java programming using intellij. Q1: Celsius Temperature Table The formula

Java programming using intellij.

Q1: Celsius Temperature Table

The formula for converting a temperature from Fahrenheit to Celsius is

C = 5 / 9 ( F 32 )

where F is the Fahrenheit temperature and C is the Celsius temperature. Write a method named celsius that accepts a Fahrenheit temperature as an argument. The method should return the temperature, converted to Celsius. Demonstrate the method by calling it in a loop that displays a table of the Fahrenheit temperatures 0 through 20 and their Celsius equivalents.

Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Write the following methods in the program:

• calcAverage—This method should accept five test scores as arguments and return the average of the scores.• determineGrade—This method should accept a test score as an argument and return a letter grade for the score, based on the following grading scale:

90–100​​ A

80–89 ​​B

70–79 ​​C

60–69 ​​D

Below 60 ​​F

Q3: Conversion Program

Write a program that asks the user to enter a distance in meters. The program will then pre-sent the following menu of selections:

1. Convert to kilometers

2. Convert to inches

3. Convert to feet

4. Quit the program

The program will convert the distance to kilometers, inches, or feet, depending on the user’s selection. Here are the specific requirements:

• Write a void method named showKilometers, which accepts the number of meters as an argument. The method should display the argument converted to kilometers. Convert the meters to kilometers using the following formula:

kilometers = meters * 0.001

• Write a void method named showInches, which accepts the number of meters as an argument. The method should display the argument converted to inches. Convert the meters to inches using the following formula:

inches = meters * 39.37

• Write a void method named showFeet, which accepts the number of meters as an argument. The method should display the argument converted to feet. Convert the meters to feet using the following formula:

feet = meters * 3.281

• Write a void method named menu that displays the menu of selections. This method should not accept any arguments.• The program should continue to display the menu until the user enters 4 to quit the program.• The program should not accept negative numbers for the distance in meters.• If the user selects an invalid choice from the menu, the program should display an error message.

Here is an example session with the program, using console input. The user’s input is shown in bold.

Enter a distance in meters: 500 [Enter]

1. Convert to kilometers

2. Convert to inches

3. Convert to feet

4. Quit the program

500 meters is 0.5 kilometers.

1. Convert to kilometers

2. Convert to inches

3. Convert to feet

4. Quit the program

500 meters is 1640.5 feet.

1. Convert to kilometers

2. Convert to inches

3. Convert to feet

4. Quit the program

Bye!

Q4: Present Value

Suppose you want to deposit a certain amount of money into a savings account, and then leave it alone to draw interest for the next 10 years. At the end of 10 years, you would like to have \$10,000 in the account. How much do you need to deposit today to make that happen? You can use the following formula, which is known as the present value formula, to find out:

P = F / ( 1 + r ) n

The terms in the formula are as follows:

P is the present value, or the amount that you need to deposit today.• F is the future value that you want in the account. (In this case, F is \$10,000.)• r is the annual interest rate.• n is the number of years that you plan to let the money sit in the account.

Write a method named presentValue that performs this calculation. The method should accept the future value, annual interest rate, and number of years as arguments. It should return the present value, which is the amount that you need to deposit today. Demonstrate the method in a program that lets the user experiment with different values for the formula’s terms.

Deliverables:

1. Source codes – 4 X 20 = 80%2. Screenshots of the program output. – 4 X 5 = 20%

Note: Sparingly comment your java source code, save all the files in your_lastname_lab_2 folder, zip it, and upload for grading.

Thank you!

Pages (275 words)
Standard price: \$0.00

### Latest Reviews

Impressed with the sample above? Wait there is more

Related Questions

### Your assignment is to provide a final report for Ruby

Your assignment is to provide a final report for Ruby Red Movie Theater in which you address the concerns that have been outlined in the

### Explain the effects of racism, stereotyping, and discrimination in teaching and learning of ELLs from diverse backgrounds and at varying English proficiency levels, and considering linguistic differences reflected in the ELL population

Premium Paper Help is a professional writing service that provides original papers. Our products include academic papers of varying complexity and other personalized services, along

### UK Contract Administration and Law II

UK Contract Administration and Law II I have attached a Document ‘Case Study’ where you can find the task and all instructions. I have also

### C427 Technology Applications in Healthcare Performance Assessment

C427 Technology Applications in Healthcare Performance Assessment Create a planning, organizing, directing, controlling (PODC) HIPAA training model by doing the following: 1.    Describe how you

### apply the scientific method to observation and data analysis and

apply the scientific method to observation and data analysis and test your hypothesis based on your observations.  The introduction is a statement of why you

### healthcare

Assignment To begin, select one (1) of the following healthcare systems that you would like to explore for this unit:     Acute care Next, select an environment/location:

### Well Targeted Audience

In class, each student received a company/product/brand. You are to, to the best of your abilities, determine “well targeted audience” to advertise this product or

### Reply to this post with at least 300 words, scholarly

Reply to this post with at least 300 words, scholarly references in APA format within the last 5 years published.     It is projected that

### Week 6 Assignment – Performance Management Overview In 2–4 pages,

Week 6 Assignment – Performance Management Overview In 2–4 pages, your assignment must address the following: Describe the five variables that should be addressed in

### Single parent families: The rise in divorce has created many

Single parent families: The rise in divorce has created many more families headed, at least for a while, by a single parent. Describe the differences between

### Comprehensive health assessment.

Description For this assignment, you will complete a comprehensive health assessment. Submit your completed health history form, genogram, and brief written summary addressing each of

### Write and post a sample "thank you" letter to the potential

Write and post a sample “thank you” letter to the potential employer you just had an interview with. Optimal Resume is a good resource to

New questions