Question: C++ Write a program with the following requirements to perform basic arithmetic operations. Create a GetInput method to get the values of both x and

C++

Write a program with the following requirements to perform basic arithmetic operations.

Create a GetInput method to get the values of both x and y from the user. (1%)

The program must allow the user to type the math operators in either symbols (e.g. +,-,*, and /) or words (e.g. add, sub, mul, and div). To do so, you are required to overload a Calculate method to perform the users choice of operation, that is, one for handling the strings and the other for handling the chars. The statement calling the method could look like this: Calculate(x, y, add) or Calculate(x, y, +). You design your own menu/logic of the program. (2%)

Create two methods of your choice for whatever purposes and use them. One must return a value, while the other does not. (2%)

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!