Starting from:
$35

$29

PROGRAM ONE COOKING CONVERSION PROGRAM SOLUTION




DESCRIPTION







You have some new chefs working for you and they are all animals. They do not know how to do cooking & baking conversions when given a recipe, but they are geniuses at running C++ programs. So, you are going to create a program for your animal chefs that will convert cooking & baking measurements.







WHAT YOU WILL PRACTICE







Menu based programs



Loops



Branches



Math Expressions






PROGRAM SPECIFICATIONS







MAKE YOUR CODE READABLE, MAKE YOUR OUTPUT READABLE







Follow the document named Programming Style in CSC1300.



Make sure that when you run your program that your output is not squished together. Put plenty of whitespace in your output.






KEEP TRACK OF HOW MANY CONVERSIONS MADE IN THE PROGRAM







You need to keep a running total of how many conversions are made in this program. This number will be printed at the end after the user decides to end the program.




THE MAIN MENU







Your MAIN MENU should look like mine (below). Display the menu. Then, ask the user to choose 1-4. Then, read in their choice and validate their choice. You may assume that the user entered in an integer, but you may not assume the user entered in a valid integer (1, 2, 3, or 4). If they entered an integer other than a 1-4 then your program should force the user to enter in a valid choice.







CHOICE #1 – WATER, FAHRENHEIT, & CELSIUS







If the user selected #1, then your program will execute a loop to repeat the steps below until the user chooses to return to the main menu. Make sure to keep up with how many conversions are made.




Display the following information & menu:






Read in the user’s choice & validate the user’s choice. You may assume the user will enter in an integer, but you may not assume he or she will enter in a valid integer.

Choice 1 – Ask user for temperature in Celsius, do the conversion, print the result.






Choice 2 – ask user for temperature in Fahrenheit, do the conversion, print the result.
CHOICE #2 – GALLON, QUART, PINT, & CUP







If the user selected #2, then your program will execute a loop to repeat the steps below until the user chooses to return to the main menu. Make sure to keep up with how many conversions are made.




Display the following information & menu:









Read in the user’s choice & validate the user’s choice. You may assume the user will enter in an integer, but you may not assume he or she will enter in a valid integer.

Choice 1 – ask user for gallons, do the conversions, print the results.









Choice 2 - ask user for quarts, do the conversions, print the results.












Choice 3 – ask the user for pints, do the conversions, print the results.












Choice 4 – ask the user for cups, do the conversions, print the results.
CHOICE #3 – TEASPOON, TABLESPOON, & CUP







If the user selected #3, then your program will execute a loop to repeat the steps below until the user chooses to return to the main menu. Make sure to keep up with how many conversions are made.




Display the following information & menu:









Read in the user’s choice & validate the user’s choice. You may assume the user will enter in an integer, but you may not assume he or she will enter in a valid integer.

Choice 1 – ask user for teaspoons, do the conversions, print the results.












Choice 2 - ask user for tablespoons, do the conversions, print the results.









Choice 3 – ask the user for cups, do the conversions, print the results.









HOICE#4 – END THE PROGRAM







Before the program ends, print out how many conversions were made during the execution of the program.

More products