Write a menu-driven program to create a class ‘num’ which stores an integer number. Derive three classes from ‘num’ class namely ‘binary’, ‘octal’ and ‘hexa’ which store the binary, octal and hexadecimal equivalent of the number in ‘num’ class. Input an integer value at run-time and display its binary, octal and hexadecimal equivalent.
Comments
Leave a comment