For all phases of this project, you will submit your own work without a partner. You may consult with other members of the class, but you need to do and submit the work with your own hands on the mouse and keyboard. Ideally, you will do this work on your own computer. If you don't own one, use the CS lab computers in the CMC.
We will, together, write a Java program with sprites moving around in a window, making sounds.
The final main program will be written by Jeff, and each student will write one sprite subclass. The result should be weirdly spectacular.
The code will all be shared and maintained in a single Mercurial repository.
You will get briefly introduced to:
Here's a description of the Sprite class you should use in your diagram:
Sprite ------ Point size Point position Point velocity ------ Sprite() [default constructor] setters and getters for size, position, and velocity void step() void makeSound() void draw(Window w)
Here, the "step()" method causes the sprite to make a movement for a single timestep, based on the sprite's position and velocity. Even with this very simple interface (no return value, no parameters) your subclasses could make their animated behavior quite complex by arranging for successive calls of step() and draw(w) to make a sequence of changes. The caller (my main program, for example) doesn't need to know anything about the complexity of the specific sprite's stepping and drawing.
Note that step() only changes the position, possibly the velocity, and any internal state in your particular subclasses. It doesn't do any redrawing--that's the job of the draw method.