Introduction to Programming: Additional work for week 3

The .class files for the Ship examples can be found in the directory /import/teaching/BSc/1st/ItP/Barnes/Creating/Ships, along with the code for the examples discussed in the lectures. If you want to run these for yourself, you will need to copy all the files ending in .class from the directory. The reason for this is that the Ship class calls on further classes in order to provide the graphical display. You don't need to know what the Java code for all this is, but if you want to look at it, it's in the src subdirectory of the above directory.

For extra work this week, you should make sure you can run the Ship examples discussed in class, and also try writing and running a few more simple programs of your own using the Ship class.

You should have read a bit more of your textbooks: up to chapter 3 of either the Barnes book or the Horstmann book. The Barnes book covers material much the same as we have covered in class, the Horstmann book goes into more detail on number types and arithmetic than we have covered now. The other books take the approach of covering control structures (which we shall do later) before saying more about objects.

Useful additional reading from the web on the concepts of classes, objects and methods can be found in:

Matthew Huntbach
10th October 2000