In this assignment you will be creating several java


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.

Class attribute suggestions:

  • Aircraft: maxSpeed, maxPassengers, numEngines
  • Pilot: yearsExperience, age, vision
  • Passenger: frequentFlyerPoints, finalDestination, seatingSection
  • Stewardess: yearsExperience, isFullTime, hoursWorked
  • Suitcase: numPockets, maxWeight, hasCarryStrap
  • Map: size, country, region
  • Address: city, state, zip

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: In this assignment you will be creating several java
Reference No:- TGS02193102

Now Priced at $25 (50% Discount)

Recommended (90%)

Rated (4.3/5)