A new seat booking system is required to help users reserve a seat based on the following requirements: First or Standard Class  Window and/or Aisle. With or Without Table. Seat Price.  When a suitable match is found, the user (identified by their eMail) should be able to reserve the seat. Seat reservations may also be cancelled. The seat data should be modelled in a file seats.txt that will contain the seat data and any reservations, though initially every seat should be unreserved. Upon application launch, the data should be loaded into appropriate data structures and upon application exit, the data should be saved back to the file.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

A new seat booking system is required to help users reserve a seat based on the following requirements:

  • First or Standard Class
  •  Window and/or Aisle.
  • With or Without Table.
  • Seat Price.

 When a suitable match is found, the user (identified by their eMail) should be able to reserve the seat. Seat reservations may also be cancelled. The seat data should be modelled in a file seats.txt that will contain the seat data and any reservations, though initially every seat should be unreserved. Upon application launch, the data should be loaded into appropriate data structures and upon application exit, the data should be saved back to the file.

NOTE: The seats.txt file is attached in the images. The format of each seats’s data is as follows: seatNum seatClass isWindow isAisle isTable seatPrice eMail.

You are then required to produce a console application (using Java) that is driven by a repeating main menu (Attached in the image) with appropriate instructions and guidance throughout. Menu options should include reserving a seat, cancelling a seat and viewing seat reservations. Additional credit may be gained by implementing extra functionality:

  • Performing Validation (i.e. fallacious input should be rejected).
  • Before rejecting a reservation (i.e. no seats match the guest’s seat requirements) the application offers the “next best match” (i.e. we can match 3 of your 5 seat requirements).
This is the content of Seat.txt file
1A STD true false false 23.50 free
18 STD false true false 23.50 free
1D STD true true false 27.50 free
2A STD true false true 24-50 free
2B STD false true true 24-50 free
2D STD true true true 28.50 free
3A STD true false true 24.50 free
3B STD false true true 24-50 free
3D STD true true true 28.50 free
4A STD true false false 23.50 free
48 STD false true false 23.50 free
4D STD true true false 27.50 free
SA 1ST true true true 48.50 free
SC 1ST false true true 44.50 free
5D 1ST true false true 44.50 free
6A 1ST true true true 48.50 free
6C 1ST false true true 44-50 free
6D 1ST true false true 44.50 free
Note that in the original file above the field 'free' indicates that a seat is not booked, an email would appear in this
field when a seat is booked. So for example, the stored data would appear as below after several seats are
booked.
1A STD true false false 23.50 free
18 STD false true false 23.50 free
1D STD true true false 27.50 free
2A STD true false true 24.50 n. aalia@oryx.edu.qa
2B STD false true true 24-50 free
2D STD true true true 28.50 free
3A STD true false true 24.50 free
3B STD false true true 24.50 free
3D STD true true true 28.50 free
4A STD true false false 23-50 a.hassan@oryx.edu.qa
4B STD false true false 23.50 free
4D STD true true false 27.50 free
SA 1ST true true true 48.50 free
5C 1ST false true true 44.50 free
5D 1ST true false true 44.50 free
6A 1ST true true true 48.50 x.galy@oryx.edu.qa
6C 1ST false true true 44-50 free
6D 1ST true false true 44.50 free
This data would be saved back to the seats.txt file when the application exits.
Transcribed Image Text:This is the content of Seat.txt file 1A STD true false false 23.50 free 18 STD false true false 23.50 free 1D STD true true false 27.50 free 2A STD true false true 24-50 free 2B STD false true true 24-50 free 2D STD true true true 28.50 free 3A STD true false true 24.50 free 3B STD false true true 24-50 free 3D STD true true true 28.50 free 4A STD true false false 23.50 free 48 STD false true false 23.50 free 4D STD true true false 27.50 free SA 1ST true true true 48.50 free SC 1ST false true true 44.50 free 5D 1ST true false true 44.50 free 6A 1ST true true true 48.50 free 6C 1ST false true true 44-50 free 6D 1ST true false true 44.50 free Note that in the original file above the field 'free' indicates that a seat is not booked, an email would appear in this field when a seat is booked. So for example, the stored data would appear as below after several seats are booked. 1A STD true false false 23.50 free 18 STD false true false 23.50 free 1D STD true true false 27.50 free 2A STD true false true 24.50 n. aalia@oryx.edu.qa 2B STD false true true 24-50 free 2D STD true true true 28.50 free 3A STD true false true 24.50 free 3B STD false true true 24.50 free 3D STD true true true 28.50 free 4A STD true false false 23-50 a.hassan@oryx.edu.qa 4B STD false true false 23.50 free 4D STD true true false 27.50 free SA 1ST true true true 48.50 free 5C 1ST false true true 44.50 free 5D 1ST true false true 44.50 free 6A 1ST true true true 48.50 x.galy@oryx.edu.qa 6C 1ST false true true 44-50 free 6D 1ST true false true 44.50 free This data would be saved back to the seats.txt file when the application exits.
--Seat Booking System --
-- MAIN MENU --
1- Reserve Seat
2- Cancel Seat
3- View Seat Reservations
Q-Quit
Pick:
Transcribed Image Text:--Seat Booking System -- -- MAIN MENU -- 1- Reserve Seat 2- Cancel Seat 3- View Seat Reservations Q-Quit Pick:
Expert Solution
steps

Step by step

Solved in 6 steps with 14 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY