School of Engineering and Applied Science
Department of Computer Science
CSci 133 -- Introduction to Software Development
http://www.seas.gwu.edu/~csci133/spring04
Prof. Michael B. Feldman
mfeldman@gwu.edu

Lab Exercise #4
for labs meeting Friday, Feb. 6, 2004

Part 1:

Complete the "preliminaries" part of Project 3.

Part 2:

In class we've been discussing how software is constructed out of pieces. Sometimes these pieces are system or API classes, and abstraction is used to insulate you from all the details that are needed to make your program run.

To see some of this in action, you're going to explore the "verbose" options of two Java compilers and of the Java Virtual Machine, to see just how many classes actually contribute to a small program.

As an example of a program that uses nothing but System.out, copy programs133/Lincoln.java to your csci133 directory. Now compile it, but do not use jcompile. Instead, call the jikes compiler directly:

jikes -verbose Lincoln.java

Copy/paste the compiler messages to a NotePad window, so you can keep it to compare.

Now run Lincoln, but don't use jrun. Instead, call the JVM directly:

java -verbose Lincoln

Again, save the output in a NotePad window.

Now repeat, but this time use the Sun Java compiler:

jikes -verbose Lincoln.java
java -verbose Lincoln


compare the messages from the two compilers, and the two runs. Any differences?

Now try the same comparison on an example that uses cs1.Keyboard. First, recompile cs1.Keyboard.java using jikes -verbose, do the same with programs133/AverageSpeed.java, and run the result. Now repeat using javac -verbose.

Now try the same with mbf/Screen.java and programs133/Smiley.java.

Finally, using first jikes, then javac, recompile all the classes necessary to build Bingo.java.

Part 3:

If you finish the above parts, work on Project 3.

(end of lab)