This is what I need to do, but i don't really know where to begin. Can anyone help of give tips?
Create a class LongInteger that represents a single long integer value. The class should have methods that allow you to add, subtract, multiply, and divide two LongInteger objects. Each of these methods should return a new LongInteger object. There should also be get and set methods to allow the value of the integer to be changed. Implement a toString() which returns the string representation of the integer. Finally, implement the Comparable interface so that two LongInteger objects can be compared.
Derive a class from LongInteger called BinaryInteger, which is a binary (base 2) version of LongInteger. It should be able to do all the things LongInteger does (add, subtract, multiply, divide, compare two BinaryInteger objects.) Of course, the toString method needs to return a binary number in string format.
Derive a class from LongInteger called OctalInteger, which is an octal (base 8) version of LongInteger. It should be able to do all the things LongInteger does (add, subtract, multiply, divide, compare.) The toString method needs to return an octal number in string format.
Derive a class from LongInteger called HexInteger, which is a hexadecimal (base 16) version of LongInteger. As with BinaryInteger, HexInteger should have add, subtract, multiply, divide, and the ability to compare. It should also have its own toString.
Create a class IntDriver which will contain a main method. The class should do the following:
1. Present the user with a menu that allows them to select one of the above three numbers. The user is then supposed to enter a number of that type. If the number they enter is not of the specified type, throw an exception to handle it. The type of exception you throw is up to you, but you should include the type of number expected and the input the user entered. This information should be printed to the screen (ex: BinaryInteger expected, user entered 1010102). The user should then be re-prompted for an integer of the chosen type.
Continue allowing the user to choose numbers until she either chooses to quit or 25 numbers are entered.
2. Sort all the numbers entered by the user. You are guaranteed at least two numbers will be entered and that there will be at least two numbers of the same type.
3. Print the numbers to the screen, one per line.
4. Go through the array and find two numbers of the same type. Report their values then add them, subtract them, multiply them, and divide them. Of course you'll want to print the results of each of those arithmetic operations.