In this assignment, you will be creating several Java classes to model a small plane flying passengers from State College, PA to Orlando, FL.
You must include:
- Each Aircraft contains one Pilot, one Stewardess, and four Passengers
- Each person (Pilot, Stewardess, or Passenger) has a Suitcase
- Each person (Pilot, Stewardess, or Passenger) has an Address
- Your main() method must instantiate and populate each of these classes
- Your Aircraft class must have a getInfo() method that returns all of the information about the aircraft, each person on board, and all of their items/attributes. You should call this method from your main() method.
- Your program must use an ArrayList of passengers
- Your program must save your passenger list to an XML file using the techniques discussed in class.
- Each class must have at least 2 (properly encapsulated) attributes (in addition to the required class relationships above). See suggestions below if you have difficulty choosing attributes.
- Aircraft: maxSpeed, max passengers, numEngines
- Pilot: yearsExperience, age, vision
- Passenger: frequent flyer points, finalDestination, seating section
- Stewardess: yearsExperience, is full time, hoursWorked
- Suitcase: gum pockets, max weight, has a carry strap
- Map: size, country, region
- Address: city, state, zip
You must model the following relationships:
Class attribute suggestions: