V22.0101 ......Homework Assignment 2...... Spring 2004
Alternative Representation of Numbers

First Version Due (by email to etutor): March 2, 2004
Final Version Due (by email to etutor): 7 days after receiving comments from etutor

Please read the assignment carefully. If you need help, don't hesitate to contact your E-TUTOR or professor, but send the email EARLY, NOT just before the deadline. You can also see the TA or the Professor during their office hours.

This assignment asks you to write a Java class called SmalInt (similar to a wrapper class). SmallInt contains the following:  

You need to write a second public class (that means you will need two .java files) called TestSmallInt. TestSmallInt will have just one main method. It will prompt the user for a number in the range 0 - MAXVALUE (note: You must use the static constant MAXVALUE from the SmallInt class. Since you will not be in that class, you will need to use the ClassName.VarName syntax). Then it will simply instantiate a SmallInt object using SmallInt's constructor and print the decimal representation, the binary representation and the hexadecimal representation of the number entered by the user.

Please get started on the assignment immediately, and contact your etutor or professor as soon as possible with any questions. Don't expect a response the day before the due date. Late homeworks will be accepted up to 7 days late, but they will be penalized 25%.

Remember, you may submit a revised version to your etutor within 7 days of receiving comments on your first version, in order to improve your grade.