Answered step by step
Verified Expert Solution
Question
1 Approved Answer
An airport system keeps track of the flights to and from Doha, along with their details. The diagram below shows the different classes and their
An airport system keeps track of the flights to and from Doha, along with their details. The diagram below shows the different classes and their associations. Date -day int -month int -year int Flight Date passengers Flight -flightNo: String -source: String -destination String + Flight(String, String, Sting, Date) +getFlightNo() : int setFlightNo(int) : void +getSource(): String +setSource(String) void +getDestination(): String +setDestination(String) vold +getPassengers(): ArrayList +addPassenger(Person):void +toStringo String Person -id.int -name: String constuctor setters getters +toString(): String The classes Person & Date are given in page 3. Create the class Flight using the diagram above then create the test class AirportApp to test your application. I In Person class: 1. Add the method toString() that returns the details of this person (id & name). In Flight class: 1. Define the attributes, add setters, getters and a constructor that initializes the fields flightNo, source, destination, and flightDate. Java Any Expert
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started