Write a program for converting us measurement values to


Programming and Logic : Java

Write a program for converting US measurement values to their corresponding metric measurement.

The program will have at a minimum 7 methods as follows:

The main method of the program will make calls to the various methods required for this assignment.

It will contain a loop so that multiple conversions may be performed in one run of the program.

The main program evaluates the choice of conversion to perform, prompts for the value to convert and calls the appropriate method which returns the converted value. It then outputs the conversion performed and the from to values with appropriate labels.

A method that displays the menu options for which conversion to perform. The main method prompts for entry of the menu choice.

A Miles to Kilometers method that requires the number of miles to convert as a parameter. US Miles / 0.62137 gives equivalent kilometer conversion.

A Dollars to Euros method that requires the dollar and cents amount to convert as a parameter. US Dollars / 0.938082 gives equivalent Euro conversion.

A Fluid ounces to Milliliters method that requires the number of fluid ounces to convert as a parameter. US Fluid Ounces / 0.033814 gives equivalent Milliliter conversion.

A Gallon to Liters method that requires the number of gallons to convert as a parameter. US Gallons / 0.26417 gives equivalent Liter conversion.

A Pounds to Kilograms method that requires the number of pounds to convert as a parameter. US Pounds / 2.2046 gives equivalent kilogram conversion.

For output, the program needs to display the conversion being perform and the actual from and converted values.

(eg.)

US to Metric Measurement Conversion

1) Miles to Kilometers

2) Dollars to Euros

3) Fluid ounces to Milliliters

4) Gallons to Liters

5) Pounds to Kilograms

6) Exit the program

Enter your conversion choice: 1

Converting Miles to Kilometers

2.5 miles is 4.02336772 kilometers

To continue enter another conversion choice:

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program for converting us measurement values to
Reference No:- TGS02902644

Expected delivery within 24 Hours