Question: QUESTION 2 : Implement a class Flight that represents an airplane flight as follows. The class should encapsulate information about the origin, destination, date of

QUESTION 2: Implement a class Flight that represents an airplane flight as follows.
The class should encapsulate information about the origin, destination, date of departure, date of arrival, and flight number. (the flight number should be ineremented automatically; the first flight has a number 1, the second 2, and so on. The flight number is fixed at all times and does not change.
The class should have only one constructor and no set methods.
The class should be able to print the standard output information about itself.
Test your class with a simple driver that defines two different flights and prints their details. Use separate implementations with different headers to store the class declaration.
 QUESTION 2: Implement a class Flight that represents an airplane flight

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!