create an online booking system

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
Hundreds, if not thousands, of people are coming to Calgary to attend information sessions on chinooks. They will be accommodated at the Chinook Centre Hotel. You are to create an online booking system (with some limitations ☺) for their use. The Centre has four floors: Floor1: Rooms 100, 102, 104, 106, 108, 110, 112, . . . . . . . . . . . ., 198 Floor2: Rooms 200, 202, 204, 206, 208, 210, 212, . . . . . . . . . . . ., 298 Floor 3: Rooms 300, 302, 304, 306, 308, 310, 312, . . . . . . . . . . . ., 398 Floor 4: Rooms 400, 402, 404, 406, 408, 410, 412, . . . . . . . . . . . ., 498 Note that rooms are numbered in increments of two. Rooms are being assigned on the basis of the first initial of the attendee’s last name: People whose last name begins with “A” to “F” are on the first floor (rooms 100 – 198) People whose last name begins with “G” to “L” are on the second floor (rooms 200 – 298) People whose last name begins with “M” to “R” are on the third floor (rooms 300 – 398) People whose last name begins with “S” to “Z” are on the fourth floor (rooms 400 – 498) Program Do this in the stages indicated below. Get each stage working before going on to the next stage! (It is easier to make changes to programs one bit at a time to avoid becoming inundated with errors. Create a program which uses a loop to generate a list of room numbers at run time. (I suggest using the for next loop) You should check to make sure the user has entered two names. The first initial of the user’s last name determines which list will appear. (Extract the first letter of their last name by finding the space in the name textbox input. (IndexOf function) Extract the character following that space to a variable. (Use the mid() function, position is the IndexOf result + 2, and just 1 character) The user may also enter upper or lower case letters. Use a string conversion function to handle this situation. A Case structure works very well here to determine which room list should appear at run-time. It would be a good idea to clear the list box before you populate it with a new list of rooms each time the sub runs. A note: This can be done by writing 1 loop or by writing 4 loops. Which way is considered better coding? Once the list appears, users may select a room to confirm their choice. Again check to make sure the user has selected a room number from the list before proceeding with the booking. Use a MessageBox function and the DialogResult data type, then a MessageBox to code these pop up windows. Finally add the guest’s name after the room number in the list box of the room just booked, don’t forget to put a space between the room number and the name. Now add the ability to keep track of which rooms have already been booked. (Hint: Use a two dimensional array, where the first dimension represents the floor and the second dimension represents the room) When a guest books a room store their name in the array on that floor and in that room. When room numbers are generated you should now go back to the room generating sub and check the array for names of the guests in the rooms which are already booked. You should also not allow an existing booking to be lost. Prevent this by adding another Error Trapping check. You can calculate the indexes by using the following. It can be used in both getRooms and bookRoom. floor = room \ 100 ’e.g. room 368 \ 100 will yield 3 - third floor. room = room mod 100 ’e.g. remainder of 368 mod 100 is 68 - room 68.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Data Recovery Approaches
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
  • SEE MORE 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