Java Program

Write a Java program as follows:

(1) Prompt the user which action they want to take: (a) Convert cubic feet to U.S. bushels (b) Convert miles to kilometers (c) Determine graduation with honors title (d) Exit program

Don't use plagiarized sources. Get Your Custom Essay on
Java Program
Just from $13/Page
Order Essay

(2) Programs at a minimum must have the following methods: (a) Convert square feet method gets square feet and returns cubic yards (b) Convert to height method that gets height in inches and returns meters (c) Determine graduation with honors title method that gets GPA and returns honors title value

(3) For each action, the user should be prompted for corresponding data and given the appropriate output

(4) User should be able to select one action and then get prompted again for selection until they select exit choice

Use the following for calculations or category determination

• To convert from cubic feet to U.S. bushels use the formula: 1 cubic foot = 0.803564 U.S. bushel

• To convert from miles to kilometers use the following formula: 1 mile = 1.60934 km

• To determine graduation with the Honors title, create a method that uses a switch statement and the

following ranges

• For categories use:

o Cum Laude 3.5-3.7 o Magna Cum Laude 3.8-3.9

o Summa Cum Laude 4.0+

Test program:

A minimum of 4 test cases should be supplied in the form of a table with columns indicating the

input values, expected output, actual output, and if the test case passed or failed. This table

should contain 4 columns with appropriate labels and a row for each test case. An example

template is shown below. Note that the actual output should be the actual results you receive

when running your program and applying the input for the test record.

 

Make sure your Java program is using the recommended style such as:

• Javadoc comment upfront with your name as author, date, and brief purpose of the program

• Comments for variables and blocks of code to describe major functionality

• Meaningful variable names and prompts

• Identifiers are written in upper CamelCase

• Class name starts with upper case letter and variables in lower case letter

• Constants are written in All Capitals

• Use proper spacing and empty lines to make code human-readable

Capture execution:

You should capture and label screen captures associated with compiling your code and running

each of your test cases.

 

 

ORDER NOW »»

and taste our undisputed quality.