Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
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 : 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 the second 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 : 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 the second 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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