Q.
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 digit
 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.

I'd have to convert the docx to the word processor I have right now. Next time use the forum's own code sharing tool (code block.)

Also no one does homework for others so I think you are asking for a tutorial on inheritance. Here's one that I used:
https://www.tutorialspoint.com/cplusplus/cpp_inheritance.htm

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.