Java classes
Question
Description: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:
- An Aircraft class
- A Pilot class
- A Passenger class
- A Stewardess class
- A Suitcase class
- An Address class
- A Map class
You must model the following relationships:
- 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
- Each Pilot has a Map
Other requirements:
- 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.