Question: Write a program in C++ with the following requirements: 1- Create the class Integer(this class will have one member variable of type int): a. The

Write a program in C++ with the following requirements: 1- Create the class "Integer"(this class will have one member variable of type int): a. The class must have 2 constructors: default, and parametrized (which initializes the member variable). b. The class should have get and set methods for the member variable. C. The class should have the functionalities: addition, subtraction, multiplication, and division. 2- Write the main function in a separate file where you will implement the logic of a calculator over "Integer" objects only for the functionalities that are implemented in "Integer" class. For example, you can create three objects from the class "Integer where the first object will hold the first number, the second object will hold the second number, and the third object will hold the result. The operations that will be used over the objects, need to be chosen by the user (ex: user will enter A for Addition and D for Division and so on...). It is recommended to use the "switch statement to check the operation entered. The program will end when the user enters E (meaning exit). It is recommended to use while or do- while" loop to control the termination of the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
