Question: Written in C++ We will create a data conversion program. We will present the end-user with a menu of choices and perform the chosen operation.

Written in C++

We will create a data conversion program. We will present the end-user with a menu of choices and perform the chosen operation. The menu must appear just as below:

Welcome to the data converter thingy!

1) Convert KB to MB

2) Convert KB to GB

3) Convert MB to KB

4) Convert MB to GB

5) Convert GB to MB

6) Convert GB to KB

7) Exit

Please input a number from 1 to 7 >

Notes:

1. Create a choice function that is repeatedly called from the main() function that displays the choices.

2. The choices menu will display the choices as above and accept user input until a valid number in the range is input. Upon detecting valid input it will return the integer chosen.

3. When the choices function returns a valid selection, code in the main function will obtain the necessary input from the user, then call the function that calculates the result, and display the result.

4. Note that our units change by 2^10, that is, 1024. 1GB = 1024MB, 1 MB = 1024 KB, and 1KB = 1024 bytes. 1KB is NOT 1000bytes, 1MB is NOT 1000KB, and 1GB is NOT 1000MB.

5. You are to get the data size in the original units and convert to the new unit using the functions that do that. You should then output the new quantity as a number with decimals, properly labeled.

6. We have no idea how many iterations the user will want to execute a conversion from the main.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!