Question: Your fourth programming assignment will focus on the use of the switch statement and loops that we covered in chapters 4 and 5. You will









Your fourth programming assignment will focus on the use of the switch statement and loops that we covered in chapters 4 and 5. You will also be using a file. We will also be making use of the other C++ language constructs you have used in past assignments, including the if statement and functions. In part 2 you will be writing to an output file The program will display a menu with various options as follows: Enter one of the following commands 0 Quit the application. 1 Add 2 Subtract 3 Multiply 4 Divide 5 Clear total 6 Square root of current total 7 Current total to the power x The menu items 0 through 7 are for part 1. All data used by the functions must: Be internal to the function (declared and only used inside the function) Be passed to the function via parameters Be returned back from the function via the return statement Not be global variables. No global variables can be used by your program unless the variables are defined as const values (that is, they cannot be changed). The function descriptions below tell you the details about what parameters are passed to the function and what values are returned back from the functions. You must adhere to this design or you will have points taken off from your grade. Required functions: void displayMenu() The menu must be displayed with a function called displayMenu. This function returns a void value (no return value) and takes no input parameters. It does not prompt the user for any values, it simply displays the contents ofthe menu
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
