A number system is a way to represent numbers. The number system that we use in our day-to-day life is the decimal number system. Decimal number system has base 10 as it uses 10 digits from 0 to 9. In decimal number system, the successive positions to the left of the decimal point represent units, tens,
hundreds, thousands and so on. Other common number systems include base-16 (hexadecimal), base-8 (octal), and base-2 (binary). When we type some letters or words, the computer translates them in numbers as computers can understand only numbers. A computer can understand positional number system where there are only a few symbols called digits and these symbols represent different values depending on the position they occupy in the number. A value of each digit in a number can be determined using:
The position of the digit in the number
The base of the number system (where base is defined as the total number of digits available in the number system).
Implement a class hierarchy in C++ with Number System as a base class and four derived classes to represent each of the four number systems (binary,decimal,octal,hexa decimal. Use this class hierarchy to implement a Number Conversion Calculator.
B. Your calculator should have following features:
Take a number (in any of the four bases) and be able to convert it into specified base.
To add, subtract, multiply and divide numbers (in any of the four bases) using operator overloading.
Now I have done the conversion part but the problem is that I have done it without usinh inhertance.So Please help me.I need this code given in the file along with the Questionconverted in hirarichical inheritance.