- Coder: The following assumes that you cloned the book code repo into
~/oodp3code in the lab for lecture 2. Verify that's correct, and otherwise adjust the instructions. Or, if you've never done it, go back to lecture 2 to see how to do the cloning.
In a terminal window, type
mkdir ~/cs151/lab5
cp -R ~/oodp3code/ch02/mail ~/cs151/lab5
cd ~/cs151/lab5/mail
javac *.java
java MailSystemTester
What happens?
- Type commands to connect to mailbox 14, type a message, hang up, dial mailbox 14 again, and read the message. Hit Q to quit the program.
- Put all the keystrokes that you just typed in a file
~/cs151/lab2/mail/keys.txt
- Now let's see if you captured the keystrokes just so. Run
java MailSystemTester < keys.txt
What happened?
-
If everything was right, then you should see the output of the preceding program run on the screen. If your last keystroke was
Q, the program should have terminated, and you should get a prompt back. If not, hit Ctrl+C to kill the program and fix up keys.txt
- NOTE: The grader will do this for homework 3.
- NOTE: If you do this in a project that you compiled in Eclipse, the class files will be in a
bin directory. In that case, run
java -classpath bin MailSystemTester < keys.txt