Question: I have created a large program in C++ that performs different calculations and functions as a calculator. As outlined below, I need to create 2
I have created a large program in C++ that performs different calculations and functions as a calculator. As outlined below, I need to create 2 functions to log the history of executions.
Design a function that will display which operations were executed (option K in the menu). Below is an example of information displayed for option K DISPLAYING HISTORY OF EXECUTIONS Addition:Success 3 2 Subtraction : Success 15-21 = -6 Division: Failure 15/0 If the function was not executed the status for that function would appear as "Failure". You will need to write the following two functions: void logoperation (ofstream& outputFile, string whatHappened): this function is called each time an operation (A to J) is executed to save in an output file a string named whatHappened that contains the following: the operation name (Addition, etc.), operands, results (if any), and whether the operation was success or failure (see above example) void displayHistory ofstream& outputFile): this function is called when option K is selected. It displays the content of the output file on the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
