School of Engineering and Applied Science
Department of Computer Science
CSci 53 -- Introduction to Software Development
http://www.seas.gwu.edu/~csci53/spring04
Alice Armstrong

Lab Exercise #2
Thursday, Jan. 22, 2004

Objectives: This exercise will help you understand listing files generated by the Java compiler and give you practice generating a .turnin file. You will need to do both for project 1.

  1. Compile Lincoln.java which should all ready be in your csci53 directory. If it is not, refer to Lab 1 for instructions about copying files from the programs53 directory into your csci53 directory.

  2. Run Lincoln. It should say:
    A quote from Abraham Lincoln:
    Whatever you are, be a good one.


  3. Examine Lincoln.txt in the vi editor.

  4. Change the line in Lincoln.txt that says Whatever you are, be a good one to say something else.

  5. Recompile and run Lincoln. What happens?



    Why?



  6. Copy Lincoln.java to a file in your csci53 directory called LabLincoln.java. This file should not exist in your directory befor you try to copy. refer to your UNIX commands for help on this.

  7. Open LabLincoln.java in the vi editor and change the line:
    public class Lincoln so that it says
    pubic class LabLincoln

  8. Now change the quote to something else.

  9. Recompile LabLincoln.java and run it.

  10. When you are satisfied with your new quote, create a .turnin file that shows a run of Lincoln.java and LabLincoln.java.
(end of lab)