Create a program for calculator


Problem:

Question 1: Write a class Calculator which has different implementation of function getSum() depending on the inputs - Integer, Double and Float.

Question 2: a)Create a class Cent which has a data member numberOfCents. Overload "+" and "-" operator to print the sum and difference of two cents.

b)Overload ">" and "<=" operator to compare two cents.

Question 3: Create a class Phone number with data members areacode, exchange and code. Overload the output and input operator to take the input in the format- 123-435-9090 and display output at: Area Code: 123, Exchange: 435, Code: 9090

Show the code, demonstrate it works properly and describe what it is doing.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create a program for calculator
Reference No:- TGS0891475

Expected delivery within 24 Hours