Question
please do this using C# Venue Booking System In this assignment you are to develop a simple booking system to manage the seating for a
please do this using C# Venue Booking System
In this assignment you are to develop a simple booking system to manage the seating for a venue, say for example at a small theatre. In this assignment you will:
Practice your GUI development skills by working with basic form controls and build an app that meets the specifications by handling basic events fired by such controls.
Apply your OOP skills by implementing the main logic of the app inside a class of objects representing Venues.
Apply your skills utilizing some basic C# collections.
For simplicity, lets assume the venue has 3 rows with 4 seats in each row. Also, the bookings will just be maintained in memory - we will worry about storing data in files later in the course. The screenshots below will help but to implement this app proceed through the following steps
Use a grid of labeled buttons to simply represent the seats in the venue. The colour of the button indicates its - e.g. green means the seat is available and red means it is booked.
Allow the user to seat (i.e. book) people (by name) in the venue or add them to the waiting list:
The user must enter the name of the person to be seated.
If seats are available, let the user provide a persons name and select a seat by seat using the row/seat list boxes and then click book to book that persons seat in the venue.
If no seats are available, Book and Add to waiting list buttons will add the person to the waiting list.
If seats are available, add to waiting list button will not do anything, except showing a message Seats are available.
Hovering the mouse over a button (representing a seat) will show the booked persons name, if the seat is booked, otherwise it will just say available.
By clicking the Status button, the status of the selected seat will be shown - i.e. the app will indicate if its empty or, if occupied, the name of the occupant.
Cancel a booking:
Choose the seat row & number to be canceled.
Click Cancel to delete the persons booking.
If the cancellation request is valid (i.e. valid row & number and there is a person already seated) then prompt the user for confirmation via a confirmation-style message box.
If the waiting list is empty, display that a seat as available
If the waiting list is not empty, remove the first person from the list and give him or her the newly vacated seat.
Show a message, using a label at the bottom of the form (i.e. do not invoke message boxes for information messages!), when:
Book is pressed when either the persons name is missing, or the row or seat is not selected.
Book is pressed when the chosen seat is already taken
Add to Waiting List is pressed when there are seats available.
Cancel is pressed without specifying the seat.
After a successful booking.
After successfully canceling a seat.
After successfully adding to the waiting list.
Add a Fill all seats button. Clicking this button will fill all the vacant seats, up to the maximum of all 12 seats. You must still enter a persons name but then that name will be used for all the seats filled by this action.
Add a Cancel all bookings button that cancels all the current bookings.
Dont restrict or constrain the length of the passenger name. For example, I should be able to book a person with the name a, as long as the name is not just whitespace.
And finally, maintain a summary status at the top indicating the total capacity, the number of seats available (and include with that a percentage of current capacity, and the number of people on the waitlist, if any. Again, see the screenshots below for examples of this.
Remember to incorporate the following for this (and all) program:
Program comments before classes, describing what their objects represent.
Comments before each method describing what it does
Form control and program variable names should be camel notation, full words
UI controls should have a prefix denoting their control type: txt, btn, etc.
Variables must not have a datatype prefix or suffix (i.e. no Hungarian notation)
Methods should be Pascal notation, except for generated event handlers
Add Implementation comments where (you think) necessary or helpful.
The following screenshots will help guide you. The first one shows the app when it first starts:
And after a successful booking:
After a failed attempt at booking:
After a failed attempt at canceling a booking:
After one person was added to the waitlist when at full capacity:
And finally, showing the effect of hovering the mouse over a booked seat:
Implementation Notes:
You may use your own imagination for designing the user interface. The screenshots of the Form are given only to clarify the requirements.
You can also choose whether or not you want to use Exceptions to handle error conditions.
However, you must define and make use of a class that implements the logic of booking seats in the venue, canceling seats, access seat status, adding to the waitlist, etc.
You have complete freedom in terms of how to structure the data that represents the seating plan at any given moment in time, but that data structure must be encapsulated within your class.
To minimize the complexity of the solution, it is ok to keep all the buttons enabled all the time.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started