Programming Assignment #0 Due: Wednesday, Jan. 20, 11:00 p.m.
turnin code: srwJ.p0
The purpose of this exercise is to compile and execute an existing java
program, to use an editor to revise the program and compile and execute
the revision.
Logon to your osprey account. Make a subdirectory for this assignment
"mkdir <subdirectory name>"
Go to the subdirectory you just created:
"cd <subdirectory name>"
See what is in the subdirectory (should be nothing):
"ls"
Copy the file named Echo.java from our class public directory to your
subdirectory:
"cp /usr/public/cop2551/swallace/Echo.java ."
Note: the '.' says name the copy the same name as the original.
Note: this file is not quite the same as the Echo.java program in the
text. Notice the differences (which are required for proper compilation).
See what is now in your subdirectory:
"ls"
Compile the file Echo.java:
"/usr/java/jdk1.5.0/bin/javac Echo.java"
This should have no errors and create a file named Echo.class
See what is now in your subdirectory:
"ls"
Execute the file Echo.class:
"/usr/java/jdk1.5.0/bin/java Echo"
Copy Echo.java to a file named Progress.java:
"cp Echo.java Progress.java"
Edit Progress.java:
Change the prompt "Enter a line of text:" to "Enter your name:"
Change the output so that the output looks like this:
<blank line>
Hello, <name>
You're making progress with java!
<blank line>
Note: Edit comments and variable names as appropriate.
Compile and edit Progress.java until it is error free.
Execute Progress.class
turnin Progress.java (NOT Progress.class) using the turnin code srwJ.p0
"turnin Progress.java srwJ.p0"
check the size of Progress.java:
"ls -l Progress.java"
Note the size in bytes
check the size of the turned in file:
"turnin -c srwJ.p0"
Make sure the size of the original file and the turned in file are the same.
Exit Program 0 -- you're done!
Evaluation: max 50 pts.
Late -- less than 24 hours: max 40 pts.
-- more than 24 but less than 48 hours: max 25 pts.
-- more than 48 hours but less than 72 hours: max 10 pts.
Evaluation based on output precisely as specified, appropriately edited
comments, and appropriate changes to variable names.