Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment: Abstract Classes, Event Driven Applications and Exception Handling USING C# Please Use C# fro this project Scenario A local travel agency, Traveless, has hired

Assignment: Abstract Classes, Event Driven Applications and Exception Handling USING C#

Please Use C# fro this project

Scenario

A local travel agency, Traveless, has hired your company to implement a new flight reservation management system to improve its productivity and services. After meeting with the agency, you realize that to tackle this complex request, you must break down the solution to three major parts:

Front-end GUI

Backend

Functional front end connected to the backend

Equipment and Materials

For this assignment, you will need:

Visual Studio IDE

Supplied data files:

flights.csv

airports.csv

Program Details

Create a functional, event-driven program that manages the travel agencys data (contained in the provided data files) and allows a user to do the following:

Find flights

A travel agent can find a flight by providing the origin airport, the destination airport and the day of the week the flight departs.

Make a reservation

A travel agent can make a flight reservation for a traveller.

A reservation code is generated and assigned to the travellers name and citizenship.

Find reservations

A travel agent can find existing flight reservations using the reservation code, and/or the airline and/or the travellers name.

Modify an existing reservation

A travel agent can update the travellers name and citizenship.

An existing flight reservation can be soft-deleted, marking it as inactive and freeing up a seat on the flight.

Detailed Requirements

When the graphical user interface is launched, the user can choose 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 List of any matching Flight objects. If no matches are found, the list control is empty.

Make Reservation

When a travel agent selects a flight from the list, the text fields are populated with the selected flight code, airline, day, time and cost. The travel agent enters the travellers full name and citizenship. The flight code, airline, day, time and cost cannot be edited. An error message is displayed if:

A reservation is to be made but no flight is selected

The name field is empty

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, and/or airline and/or travellers full name. The list is 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/or travelers full name. The method returns a list of matching Reservation objects. If no matches are found, the list control is empty. If the user doesnt enter any input, then all the reservations are displayed in the list.

Update Reservation

When a reservation in the list generated by the findReservation method is selected, the corresponding fields are populated, displaying the following information:

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 changes to the reservation, they click the Update button. The mutator methods in the Reservation object are called and an error is displayed if an exception occurs.

The persist method in the ReservationManager class saves all Reservation objects to a binary file on the hard drive.

Notes

The ReservationManager 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 (e.g.: GA-1234)

Reservation codes use the following format: (L meaning Letter, D meaning Digit)

LDDDD (e.g., 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.

C# language only

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

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

Write a Python program to check an input number is prime or not.

Answered: 1 week ago

Question

Write a program to check an input year is leap or not.

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago