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 (i.e. Appendix A) is provided on attached images. You should download the file to a new folder called data on your M: drive. The format of each seats’s data is as follows :     seatNum seatClass isWindow isAisle isTable seatPrice eMail See Appendix A for further explanation of the file seats.txt You are then required to produce a console application (using Java) that is driven by a repeating main menu (i.e. Appendix B) 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 (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).

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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 (i.e. Appendix A) is provided on attached images. You should download the file to a new folder called data on your M: drive.

The format of each seats’s data is as follows :

 

 

seatNum seatClass isWindow isAisle isTable seatPrice eMail See Appendix A for further explanation of the file seats.txt

You are then required to produce a console application (using Java) that is driven by a repeating main menu (i.e. Appendix B) 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 (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).

 

Appendix B
--Room Booking System.
MAIN MENU-
1-Reserve Room
2-Cancel Room
3-View Room Reservations
Q-Quit
Pick:
Rooms.txt file:
101 Single 23.50 false false free
102 Single 23.50 false false free
103 Double 27.50 false false free
104 Double 27.50 false false free
105 Double 27.50 false false free
201 Single 23.50 true false free
202 Single 23.50 true false free
203 Double 27.50 true false free
204 Double 27.50 true false free
205 Double 27.50 true false free
301 Single 33.50 true true free
302 Single 33.50 true true free
303 Suite 60.00 true true free
304 Suite 60.00 true true free
305 Suite 60.00 true true free
306 Double 37.50 true true free
307 Double 37.50 true true free
Transcribed Image Text:Appendix B --Room Booking System. MAIN MENU- 1-Reserve Room 2-Cancel Room 3-View Room Reservations Q-Quit Pick: Rooms.txt file: 101 Single 23.50 false false free 102 Single 23.50 false false free 103 Double 27.50 false false free 104 Double 27.50 false false free 105 Double 27.50 false false free 201 Single 23.50 true false free 202 Single 23.50 true false free 203 Double 27.50 true false free 204 Double 27.50 true false free 205 Double 27.50 true false free 301 Single 33.50 true true free 302 Single 33.50 true true free 303 Suite 60.00 true true free 304 Suite 60.00 true true free 305 Suite 60.00 true true free 306 Double 37.50 true true free 307 Double 37.50 true true free
Appendix A
101 Single 23.50 false false free
102 Single 23-50 false false free
103 Double 27.50 false false free
104 Double 27.50 false false free
105 Double 27.50 false false free
201 Single 23-50 true false free
202 Single 23.50 true false free
203 Double 27.50 true false free
204 Double 27.50 true false free
205 Double 27.50 true false free
301 Single 33.50 true true free
302 Single 33-50 true true free
303 Suite 60.00 true true free
304 Suite 60.00 true true free
305 Suite 60.00 true true free
306
Double 37.50 true true free
307 Double 37.50 true true free
Note that in the original file above the field 'free' indicates that a room is not booked, an email would appear in
this field when a room is booked. So for example, the stored data would appear as below after several rooms are
booked.
101 Single 23.50 false false free
102 Single 23.50 false false fred.bloggs@jmu.ac.uk
103 Double 27.50 false false free
104 Double 27.50 false false free
Transcribed Image Text:Appendix A 101 Single 23.50 false false free 102 Single 23-50 false false free 103 Double 27.50 false false free 104 Double 27.50 false false free 105 Double 27.50 false false free 201 Single 23-50 true false free 202 Single 23.50 true false free 203 Double 27.50 true false free 204 Double 27.50 true false free 205 Double 27.50 true false free 301 Single 33.50 true true free 302 Single 33-50 true true free 303 Suite 60.00 true true free 304 Suite 60.00 true true free 305 Suite 60.00 true true free 306 Double 37.50 true true free 307 Double 37.50 true true free Note that in the original file above the field 'free' indicates that a room is not booked, an email would appear in this field when a room is booked. So for example, the stored data would appear as below after several rooms are booked. 101 Single 23.50 false false free 102 Single 23.50 false false fred.bloggs@jmu.ac.uk 103 Double 27.50 false false free 104 Double 27.50 false false free
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education