Question: This would be used on Java and will be displayed on JavaFX Write a class called Flight that represents the Airline flight. It should contain
This would be used on Java and will be displayed on JavaFX
Write a class called Flight that represents the Airline flight. It should contain instance data that represents the airline name, flight number, flight origin and flight destination city.
Define the class constructor to accept and initialize all instance data.
Include a toString method that returns a one-line description of the flight. Create a driver class called FlightTest, whose main method instantiates and updates several flight objects.
Again, You are required to enhance the system to allow Airline users to change their destination city at will.
Note: passing an object as a parameter in a println method invokes the toString method. Eg System.out.println(Flight1);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
