Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In JAVA create a class called Flight which is representative of a flight between an origin and destination **PROVIDING FULL INSTRUCTIONS BUT ONLY NEED SOLUTION

In JAVA create a class called Flight which is representative of a flight between an origin and destination
**PROVIDING FULL INSTRUCTIONS BUT ONLY NEED SOLUTION FROM STEPS 5,6,7,8,9**
2. Create methods that will update the following:
1. Origin Airport
2. Origin Code
3. Destination Airport
4. Destination Code
5. Departure Date
6. Departure Time - Note: Changing the Departure Date/time should programmatically change the arrival date/time
7. First Class Price
8. Business Class Price
9. Main Cabin Price
3. Create methods that will return the following information: - Origin Airport - Origin Code - Destination Airport - Destination Code - Departure Date - Departure Time - Arrival Date - Arrival Time - Duration - Distance - Time Zone Difference - First Class Price - Business Class Price - Main Cabin Price - First Class Seats - Business Class Seats - Main Cabin Seats - Total Seats
4. Create a method called printFlight that will print all the information of the Flight
1. Origin Airport
2. Origin Code
3. Destination Airport
4. Destination Code
5. Departure Date
6. Departure Time
7. Arrival Date
8. Arrival Time
9. Duration
10. Distance
11. Time Zone Difference
12. First Class Price
13. Business Class Price
14. Main Cabin Price
15. First Class Price
16. Business Class Seats
17. Main Cabin Seats
18. Total Seats
5. Read a CSV file with Flight information a. Do not use a library for this part; instead, you should write the code from a CSV file with Flight information scratch. You may use Scanner or File Reader
6. Using the data from the CSV file of Flights, create Flight objects and store them inside a heap map.
7. Create a terminal-based interface that will do the following: 1. Receive input from the user to search for a specific flight by ID 2. Create a small menu that will call the functions that were created as part of the Flight class Please make this intuitive and user friendly
8. Log each action that is taken and write it to a text file
1. For example:
i. Flight ID XX updated departure date to MM/DD/YYYY
ii. Flight ID XX updated flight origin to International Airport, etc.
2. This file can be produced upon successful termination of the program
9. Handle exceptions gracefully

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

Students also viewed these Databases questions

Question

What are the APPROACHES TO HRM?

Answered: 1 week ago

Question

2. Define identity.

Answered: 1 week ago

Question

1. Identify three communication approaches to identity.

Answered: 1 week ago

Question

4. Describe phases of majority identity development.

Answered: 1 week ago