Assignment 5
COMP 106



For this project you will reimplement part of your Disasteroids game in three-dimensions using Java3D. Specifically, you will draw a spaceship, bullets, and some asteroids in 3D (don't worry about aliens). The action of the game can still take place in a two-dimensional plane, but the objects themselves should have depth. You can think of this as if the asteroids and spaceship were floating in a pool of water--the objects are three-dimensional, but they move in a 2D plane. Or, if you prefer, the action can take place in 3D--each object would then have a 3D position instead of 2D and could move in all three dimensions.

As before, you need not be restricted by what you did in the previous assignments, you can redesign your program at this point if you wish. You can also remove features that were in your previous assignments, to make this one easier to complete.

Continue to follow the object-oriented programming methodology we have been using (some of our design and programming practices are repeated below).

Program Design and Practices

(The rest of this still applies from previous assignments)

Your program design should exploit the features of object-oriented programming (encapsulation of code and data, support for abstract data types, polymorphism/overloading, inheritance). In particular, object-oriented programming provides us a good way to handle the various data needed in callback routines. You should use objects to encapsulate each interactive widget with the routines and data you need to use it.

You should provide an object for each interactive widget or small group of widgets you create. That object should hold anything you need to remember about the widget from one callback to another, all the data pertinent only to the command for that widget or that you need to operate this control, (including, in most cases, a pointer to the graph or other outside object to perform the actual action the user requested), and the widget's own listener callback routines.

If you have several widgets that share some behavior or properties, you should organize your objects into an appropriate inheritance hierarchy.

You will have other data that must be accessed by several widgets, particularly shared information about the state of the program or global information about the state of the user interface. Provide additional classes and objects for holding this kind of information.

Remember to trigger your drawing to repaint itself explicitly whenever one of your commands causes a change in the state of the graph that should be reflected on the screen. And remember that the way to change the screen is first to change the data stored in the Graph or other classes and then to trigger the repaint.

You should follow these general Java programming practices:

And, finally, for uniformity please name your Java class that has your main program in it Main, in file Main.java

Design Documentation

In addition to your program, submit documentation about the design of your system in these forms:

Submit this documentation electronically in text form. Include it as part of the readme file that you submit with your assignment.

Program Requirements

Note: one of the points of this assignment is to highlight the power of object-oriented design. If your last assignment was designed well, implementing many of these items should require little effort. Remember, this is still fundamentally the same game, it's just that the objects are drawn in 3D.