IC211: Lab 6

This lab will enhance your Tron lab by adding multiple classes in an hierarchy with inheritance. If you organized your earlier lab poorly, this is a great chance to make it better.

There will be multiple types of objects in the game. The base class will be the simple 'GameObject'. From there there are two derived classes: MobileObjects and StationaryObjects. Under MobileObjects are Cycle and Pedestrian. Pedestrians move randomly, but their moves are the same as cycles: moveForward, turnLeft, or turnRight. Cycles are player controlled and can be either regular (Cycle) or trail-leaving (LightCycle).

To do:

  1. Create the classes described above. Think carefully about how you organize things to maximize code re-use and clarity.
  2. Fix your main to work with the new classes. Enhance your main so that there can be more that 2 players, and each player gets to choose to be regular or light-cycle. Ask the user for the number of Pedestrians and the number of StationaryObjects.
  3. The program should get input and move each of the players, and then move the rest of the objects.
  4. If requested by your instructor, show him your working program.
  5. You're mature enough now that just showing something to your instructor is not sufficient. You will turn it in as well.
    1. Comment your program.
    2. Javadoc your program.
    3. Submit your program using the appropriate submit script. Different sections will have different scripts, so ask your instructor.
  6. Your lab is not turned in until it has been correctly submitted via the script, and shown to the instructor if required.
    The project will take two labs to complete. The files must be submitted by the start of lab on March 3.