1. Login to UNIX
2. Create and edit a file called 'LabX.java' (substitute the lab number
for X- where is the number of the lab- such as 'Lab1.java') in Pico, then compile and run the program.
Do the following:
- request/read one number from the user
- If the input is not a number the program should exit gracefully.
- The numbers will be printed out so the user will see what he/she input
- validate that the number is between [1..100]
- spell the number if the number is [1..10]
- If the number is greater than 100 or smaller than 1 then print a
message
saying that it is an invalid entry.
- If the number is greater than 10, specify the following:
- [11..20] your number is between 11 and 20
- [21..30] your number is between 21 and 20
- [31..40] your number is between 31 and 20
- [41..50] your number is between 41 and 50
- [51..100] your number is between 51 and 100
- All the information should be validated (catch the possible
NumberFormatExceptions)
- use a switch statement AND if statements
- Note: If the program doesn't compile or if the program crashes
you will get no credit
- Use javadoc style to write your program:
Refer to the Java Coding Standard and make sure your code adheres to its
rules.
3. Get into Pine and attach the file to an e-mail and send the e-mail /
file to the ics111-lab@hawaii.edu account.
- Your e-mail should have the following subject: labX / lastname /
section (X should be substituted for the lab number [such as lab 1], lastname should be substituted for your lastname, section
should be substituted with the A for the afternoon section and M for the
morning section) Not following this standard will result in a deduction
of points.
- control <J>, then control <T> allows you to browse and pick the file that you wish to attach
4. Check the webpage to make sure that the e-mail arrived.
Here is the URL:
http://www2.hawaii.edu/~tp_200/bmf/ics111-lab.html
5. Once I (TA) get the e-mail in my account AND I can verify it on the web,
you will receive your lab participation point. For
grading policies on your lab, click here...
Link to the Java
API - to look up any methods of any class you would like to use.
Link to the
Java Coding Standard - to look up Java code formatting rules.