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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started