Question: Break out the Math problem from Monday ( some assembly required, if you didn't do it ) . Make some changes: 1 . The display
Break out the Math problem from Monday some assembly required, if you didn't do it
Make some changes:
The display functions: change these to getDisplay functions that return a string representing the math equation of the two inputs, the opperation, and the result.
string getDisplaySumdouble num double numstring getDisplayProductdouble num double numstring getDisplayDifferencedouble num double num
Make overloaded copies of these functions that take integers instead of doubles.
Then create two functions
void writeToConsolestring textvoid writeToFilestring text, string fileName
Adjust the execute functions to ask the user if they want to print to console or print to string. Then, call the appropriate function to print the string.
Create static counter variables inside the execute functions that keep track of the number of times that that function has been called. Each time the execute function is called, increment the count and print out a message to the console reporting how many have been executed.
Put the whole system in an ongoing loop, so the user is continually asked to choose a math function, inputs, and to choose file or console.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
