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 1. Create methods that will update the

In JAVA create a class called Flight which is representative of a flight between an origin and destination

1. Create methods that will update the following:

Origin Airport

Origin Code

Destination Airport

Destination Code

Departure Date

Departure Time - Note: Changing the Departure Date/time should programmatically change the arrival date/time

First Class Price

Business Class Price

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

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 Price

Business Class Seats

Main Cabin Seats

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 For example:

Flight ID XX updated departure date to MM/DD/YYYY

Flight ID XX updated flight origin to International Airport, etc.

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions

Question

What aspects would it be impossible to capture?

Answered: 1 week ago

Question

Enhance your words with effective presentation aids

Answered: 1 week ago