CSCI 201 Fall 2003

Short Homework 3

In this homework, you will begin to write and use classes that have instance variables. In the first part of the assignment, you must complete a partially written class named Box2D. As indicated in the comments in Box2D, you will complete the class by adding instance variables and a constructor method. Box2D will not compile until you have made these additions; be sure to use the indicated names for the instance variables.

In the second part of the assignment, you complete the partially written class named BoxDemo. The BoxDemo class uses the Box2D class---it creates Box2D objects and calls their methods. Complete the BoxDemo class as described in the comments in that class. When you have completed that code, you will have created two Box2D objects and called several of their methods.

Submitting Your Assignment

The program written for this assignment must be turned in by transferring the completed java source code files, Box2D.java and BoxDemo.java, to your ftp directory for this class. You were shown how to transfer files to your class ftp directory in lab 1