Write a base class “number” that holds a single integer value (value of intInput) and contains one pure virtual member function, print_it(). This will make the base class abstract in order to prevent its instantiation. Define three derived classes to print the value in hexadecimal, octal, and binary (overriding the print_it() method). Write a program to demonstrate the use of all the derived classes. The user should enter the value to be converted (intInput).
In order to demonstrate polymorphism, the code in main() should look like:
Example = new hexadecimal(intInput);
// compiler takes care of binding and prints the value in hexadecimal
Example = new octal(intInput);