Write a program for converting us measurement values

Assignment Help Computer Engineering
Reference no: EM132109189

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:

Reference no: EM132109189

Questions Cloud

Write a java program that will ask the user : Write a Java program that will ask the user to enter three integer numbers and find the greatest or the smallest of these numbers.
Create the logic for a program that performs functions : Create the logic for the methods sum() and difference(); they compute the sum of and difference between the values of two arguments, respectively.
Differences in the way the process is performed : ACC203 – Accounting Information Systems - What are the major differences in the way the process is performed - Explain how this case demonstrates
Simulate the experience of a days business at a bank : At program launch, it will query the user for the number of tellers working that day. There must be at least four tellers, and no more than ten tellers.
Write a program for converting us measurement values : Write a program for converting US measurement values to their corresponding metric measurement.
Design a payroll class with a string containing the employee : Write another program that demonstrates the class by creating a Payroll object , then asking the user to enter the data for an employee.
Write a void method named that accepts an integer array : Write a void method named clear that accepts an integer array , and the number of elements in the array and sets the elements of the array to 0.
Write a program to read in various types of test questions : Write a C++ program to read in various types of test questions (multiple choice and True/False) from a test bank (text file), and load the questions.
Determine if the two dimensional array is a magic square : Determine if the two dimensional array is a magic square. The main method will read the size of the array outside of the while loop

Reviews

Write a Review

Computer Engineering Questions & Answers

  List the hierarchy of java swing containers from top down

List four features of the JFC. List the hierarchy of Java Swing Containers from the top down. Give an example of each.

  Explain the steps of the user-centric design process

Describe the potential outcomes of not using consistency in the human-computer interface. Summarize and explain the steps of the user-centric design process. Explain the role of human motion in the design of the human-computer interface

  Analze the letter grade the student has earned

suppose the full score for each assignment is 100. Student will get 0 for each unsubmitted assignment.

  Questioncs 136 systems analysis and design -course project

questioncs 136 systems analysis and design -course project -you have to complete and submit course project previous to

  Describe a nonrecursive method for reversing a node list

Describe a nonrecursive method for reversing a node list represented with a doubly linked list using a single pass through the list.

  Determine what is a credible web site

As we said in the chapter, computer science is about people. What general rules do you use to determine what is a credible Web site?

  Challenges in designing alternate processing site

Write some of your greatest challenges in designing an alternate processing site for the Pixel.

  Draw the complete game tree

Draw the complete game tree that begins with (a) 5 sticks (b) 6 sticks. Assign appropriate values for the leaves of the tree, and evaluate the other nodes.

  Make an orthographic projection

Make an orthographic projection and set the coordinate space so we are living inside a cube from 0 to 50 for x, y and z.

  Define open-source and proprietary databases

describe open-source and proprietary databases. What are some advantages and disadvantages of each type of database? What characteristics a business should consider when choosing a database.

  Draw logic diagram of a four-bit binary ripple down-counter

Draw the logic diagram of a 4-bit binary ripple down-counter using the following: (a) Flip-flops that trigger on the positive-edge transition of the clock. (b) Flip-flops that trigger on the negative-edge transition of the clock.

  What is an interface

What is an interface

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd