Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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 "dowhile" loop to control the termination of the program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions