You are asked to write a program that simulates a futuristic war zone. In the assignment you will program a hierarchy of classes to carry out events of the battle. As described in the introduction, there are 3 types of vehicles to be implemented. Also, independent of the type of vehicle, each has some basic data that are known about the vehicle. Each vehicle has an attribute indicating whether the vehicle belongs to the Protectors of Earth (PoE) or the Order of Enthusiastic Gamers (OEG), an attribute indicating whether the vehicle has been dealt lethal damage (similar to the lose-attribute in the Sign-class from the Rock-paperscissors example) and an attribute representing the name of the pilot of the vehicle.
Download the assignment: assignment.pdf
Download the solution:
- The main class that issues the battle: SimulateWarzone.java
- The superclass vehicle: Vehicle.java
- The subclasses of vehicle: Tank.java Aircraft.java Mech.java
Techniques used:
- Object orientation
Application type: Command line