CSCE 155

Fall 2005

 

Homework Assignment 6:  The Victory Is Foreseen!

 

Assigned:  November 7, 2005

Due:  November 21, 2005

 

Addendum

 

There is information missing from the assignment given out on November 7, 2005:

 

From this basic ShipLog.java base class you will have to create three different subclasses AWing.java, BWing.java, and XWing.java for storing three different types of fighter planes. These subclasses will contain the basic information from the ShipLog.java class and also additional information specific to each type. Each of your subclasses will also have a method to assess the current situation of the starship.  Ships that are not A-Wing, B-Wing, or X-Wing will use the default method in the parent ShipLog.java class to compute their respective readiness. In general, a ship’s assessment result i.e., Readiness Index is proportional to the current rating of its attributes and inversely proportional to its mileage and to the total number faults it has.

 

In the above, the default equation for computing the readiness index of a ship that does not fall into the three categories (A-Wing, B-Wing, X-Wing) is not given.  Here is the equation:

 

Ship

Readiness Index

unknown

 

  Note, total faults = total number of electrical faults + total number of mechanical faults

  Here you can assume that total faults > 0.