Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Details You are supplied with the Javadoc documentation of the implemented backend JAR file containing the manager, problem domain, and exception classes. You are required

Details

You are supplied with the Javadoc documentation of the implemented backend JAR file containing the manager, problem domain, and exception classes. You are required to use only the backend JAR file to access and manipulate the records in the database. All required functionality exists in the classes in the existing JAR file and can be used with your graphical user interface.

Upon the graphical user interface being launched the user can chose to either search flights and make a reservation or search for and modify a reservation.

Find Flights

The findFlights method receives as its input arguments: the originating airport, the destination airport, and the day of week. The method returns an ArrayList of any matching Flight objects. If no matches are found, the list control will be empty.

Make Reservation

When a travel agent selects a flight from the list, the text fields will be populated with the selected flight code, airline, day, time and cost. The travel agent will enter the travelers full name and citizenship. The flight code, airline, day, time and cost cannot be edited. An error message will be displayed if a reservation is to be made and no flight is selected, the name field is empty, or the citizenship field is empty.

The makeReservation method receives as its input arguments: a Flight object, the travelers name and citizenship. An exception is thrown if the flight is completely booked, or the flight is null, or the name is empty/null, or the citizenship is empty/null. If there are no exceptions thrown a Reservation object is created, saved to the binary file and returned by the method.

Find Reservations

A travel agent can search for an existing reservation that contains the specified reservation code, or airline or travellers full name. The list will be populated with any reservations that are found. Each row in the list displays the code of the corresponding reservation record.

The findReservation method receives as its input arguments: reservation code, airline and travelers full name. The method returns an ArrayList ofmatching Reservation objects. If no matches are found, the list control will be empty.

Update Reservation

When a reservation in the list is selected, the corresponding fields will be populated. These fields will display the:

  • Reservation code
  • Flight code
  • Airline name
  • Cost
  • Name
  • Citizenship
  • Status (Active or inactive)

The only fields that can be edited are the name, citizenship, and status. None of the other fields can be modified in any way by the user. After the travel agent has made any changes to the reservation, the update button will be clicked. The mutator methods in the Reservation object will be called and an error maybe displayed if an exception occurs. The persist method in the Manager class saves all Reservation and Flight objects to a binary file on the hard drive.

Notes

  • The Manager class generates the reservation code.
  • Each reservation is for one seat only.
  • The name and citizenship do not need to follow any specific format; however, they cannot be empty.
  • Each problem domain class overrides the toString() method.
  • Flight codes use the following format: (L meaning Letter, D meaning Digit)
    • LL-DDDD (I.e.: GA-1234)
  • Reservation codes use the following format: (L meaning Letter, D meaning Digit)
    • LDDDD (i.e.: I1234)
  • Times are in 24-hour format:
    • HH:MM
  • A reservation that is set to inactive is persisted and retained when the program opens again.
  • The user interface is to be designed using Swing.
    • You may use the WindowBuilder plugin for Eclipse.

Graphical user interface samples:

You may use the following screenshots to assist in building your user interfa

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

More Books

Students also viewed these Databases questions

Question

List the key objectives of a transaction processing system?

Answered: 1 week ago

Question

What is the impact of the use of technology in Finance

Answered: 1 week ago

Question

9. Understand the phenomenon of code switching and interlanguage.

Answered: 1 week ago