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

  Design clocked cmos logic circuits

Design an NMOS pass logic network that implements the logic functions described in given Problem. - Design clocked CMOS logic circuits that will implement the logic functions.

  Find a minimal expansion as boolean products

Use K-map to find a minimal expansion as Boolean products of each of these functions Also draw the logic circuit

  Find a red-black tree that is not an AVL tree

Find a red-black tree that is not an AVL tree. Prove that any AVL tree can have its nodes colored so as to make it a red-black tree.

  Questiona manufacturer of exercise equipment for health

questiona manufacturer of exercise equipment for health clubs is interested in comparing usage of equipment as in

  Implementing the transactions using sql

Write down the complete transaction utilizing the SQL. Write down the full transaction log

  Define sentence as a sequence of words followed by a period

We define a sentence as a sequence of words followed by a period, exclamation mark, or question mark.

  Write a compare function that returns 1

The user must be prompted for the values of a and b. The compare function must have arguments for a and b.

  Discuss the key points of the case study

The (enterprises architecture) EA process can be a time and resource intensive exercise that requires a deep understanding of the organization's strategy.

  Why does the create components method of filled frame call

Why does the create Components method of Filled Frame call add(panel), whereas the main method of Filled Frame Viewer calls frame.add(panel)?

  Plan a decision tree for this situation

Premium Airlines has recently offered to settle claims for a class-action suit that was originated for alleged price fixing of tickets. The proposed settlement is stated as follows. Draw a decision tree for this situation.

  Calculate the final purchase price after discount

At the President's Day sale, a customer can bring in a coupon for a 10%, 20% or 30% discount off of total purchases.

  Write two separate c programs for client and server

Write 2 separate C programs, a client & server. The client makes a connection to the server and transmits a series of numbers.

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