INSTRUCTIONS: Hand in this homework by email to our friendly TA, archi@cs.nyu.edu. Include the entire assignment in a single email message. Please use only plain text message. Do not send attachments (MIME type) or anything like that. If you are using pine email, you can include your program files into the message body as plain text by using the ^R command. Make sure that the subject line of your email says ``HW1 by <your-name-here>''.
JAVA INFORMATION: You will need to program in Java for this homework. Besides my general Java Resource Page, our T.A. has tried to gather all the basic information you will need in order to solve this porgramming problem into one convenient location: CLICK HERE
Notes: If you have deleted that message already, then first un-subscribe yourself, and then re-subscribe yourself to the mailing list. Also, DO NOT SEND any extraneous stuff (especially the long help message that you may have requested from majordomo).
We ask you to compile and run Factorial.java. You are asked to detect the SMALLEST integer n such that Factorial(n) gives you the wrong answer. Call this smallest value maxN. Note: this number may depend on the computer system on which you run. Tell us three things:
HINT: for (iii), you will need to catch exceptions. For this purpose, you might want to study the program Hello.java and also read up briefly about exceptions.
Send us the java source program only (but not the compiled program).
GENERAL RULE ABOUT PROGRAMMING ASSIGNMENTS: if your program does not compile, you get 0 point. We suggest carefully worded comments (multiline comments, /* ... */, as well as single line type, //). Make sure your program is called "fact.java", because this simplifies our grading task.