Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project Description Your family is going on an international trip. You will go to regions where measurement units used are different from home. Your mom

Project Description

Your family is going on an international trip. You will go to regions where measurement units used are different from home. Your mom is very worried about the difficulty of the conversion. You decide to help her with a converter toolkit.

Write a program that converts temperature, distance, and weight and displays the following menu:

Converter Toolkit

--------------------

1. Temperature Converter

2. Distance Converter

3. Weight Converter

4. Quit

If the user enters 1, the program should ask for the temperature in Celsius and then convert it to temperature in Fahrenheit

If the user enters 2, the program should ask for the distance in Kilometers and convert it to distance in Miles

If the user enters 3, the program should ask for the weight in Kilograms and convert it to weight in Pounds

If the user enters 4, the program should end.

Processing Requirements

1. The program should use at least one selection control structure

2. Be sure to convert as specified. For example, convert temperature from Celsius to Fahrenheit, not the other way around.

3. The program should use logical operator(s) as well as relational operator(s).

4. Use 1 kilometer = 0.6 mile, 1 kilogram = 2.2 pounds for distance and weight conversion.

5. Convert temperature to a whole number such as 78 (using setprecision), distance to two positions after the decimal point, such as 84.56, and the weight to one position after the decimal point, such as 121.6.

Sample Screen Output #1:

WORLD WIDE CONVERSIONS

Enter a country name: United Kingdom

Converter Toolkit

----------------------------------------

1. Temperature converter

2. Distance converter

3. Weight Converter

4. Quit

Enter your choice (1 - 4) 1

Please enter a temperature in Celsius (such as 24): 20

It is 68 degrees Fahrenheit.

United Kingdom sounds fun!

Thank you for testing my program!

PROGRAMMER: Tina Lee

CMSC140 Common Project 2

Due Date: October 7, 2018

Sample Screen Output #2:

WORLD WIDE CONVERSIONS

Enter a country name: Russia

Converter Toolkit

----------------------------------------

1. Temperature converter

2. Distance converter

3. Weight Converter

4. Quit

Enter your choice (1 - 4) 2

Please enter a distance in Kilometers (such as 18.54): -8

!!! Program does not convert negative distance !!!

Russia sounds fun!

Thank you for testing my program!

PROGRAMMER: Tina Lee

CMSC140 Common Project 2

Due Date: October 7, 2018

THIS IS TO BE CODED IN A C++ PROGRAM LANGUAGE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions