Number Conversions
Create two files:  ConvertBase.java and Numbers.java

ConvertBase.java
  • contains no 'main' method
  • contains no constructors
  • contains a static method named "convert"
    - has the following signature:  public static void convert(int num, int base)
    - is recursive
    - converts positive and negative base-10 integers to any base from 2 to 16
    - displays (does not return) the converted number

Numbers.java
  • a calling class
  • uses the "Scanner" class
  • does not perform any error trapping
  • contains a 'main' method
    - does not create a "ConvertBase" object
    - asks for and gets base-10 integers and bases (2 through 16) from the user
    - directly calls the "convert" method in the "ConvertBase" class for each pair of numbers
    - repeats the above two lines until the user enters zero (0) as a base-10 number


Sample Input and Output from Run of Program
===========================================
Enter a positive or negative base-10 integer (zero to quit): 258748
Enter the base (between 2 and 16) into which you would like 258748 to be converted: 16
The base-16 representation of 258748 is: 3F2BC

Enter a positive or negative base-10 integer (zero to quit): 258748
Enter the base (between 2 and 16) into which you would like 258748 to be converted: 5
The base-5 representation of 258748 is: 31234443

Enter a positive or negative base-10 integer (zero to quit): -99
Enter the base (between 2 and 16) into which you would like -99 to be converted: 2
The base-2 representation of -99 is: -1100011

Enter a positive or negative base-10 integer (zero to quit): 99
Enter the base (between 2 and 16) into which you would like 99 to be converted: 13
The base-13 representation of 99 is: 78

Enter a positive or negative base-10 integer (zero to quit): 54922
Enter the base (between 2 and 16) into which you would like 54922 to be converted: 8
The base-8 representation of 54922 is: 153212

Enter a positive or negative base-10 integer (zero to quit): 54922
Enter the base (between 2 and 16) into which you would like 54922 to be converted: 2
The base-2 representation of 54922 is: 1101011010001010

Enter a positive or negative base-10 integer (zero to quit): 54922
Enter the base (between 2 and 16) into which you would like 54922 to be converted: 16
The base-16 representation of 54922 is: D68A

Enter a positive or negative base-10 integer (zero to quit): 0