Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

how do i program this? Create a class for arithmetic operations that includes 1)

ID: 3647203 • Letter: H

Question

how do i program this?

Create a class for arithmetic operations that includes

1) A constructor
2) Declare the appropriate variables
3) A method that prompts for two integers
4) A method for adding the two numbers
5) A method for subtracting the two numbers
6) A method for multiplying the two numbers
7) A method for diving the two numbers
8) A method for using modulo with the two numbers

b. Inside of a looping structure

1) Prompt the user for a pair of integers
2) Display a menu that lists the various arithmetic operations with a referencing number
3) Use a switch structure to process the various arithmetic operations, including one for incorrect entries [An example of a working switch structure is at the end of the assignment. Avoid redundant code.]
4) After the switch structure, display a text that includes the two integers, the type of operation performed, and the result of the operation
5) Prompt the user to continue using the same integers or a new set of integers
6) Prompt the user to end the loop with an appropriate sentinel

c. When the user ends the program include a final line of text:

Explanation / Answer

/**1. Refer to the CIRCAREA program in Chapter 2, “C++ Programming Basics.” Write a function called circarea() that finds the area of a circle in a similar way. It should take an argument of type float and return an argument of the same type. Write a main() function that gets a radius value from the user, calls circarea(), and displays the result.*/ #include #include using namespace std; float circarea(float radius); /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // circarea.cpp // demonstrates floating point variables #include //for cout, etc. using namespace std; int main() { float rad; //variable of type float const float PI = 3.14159F; //type const float cout > rad; //get radius float area = PI * rad * rad; //find area cout