Question: Please start with the project I provided. The idea is you can enter dinner reservations into the system and then get back the next person
Please start with the project I provided. The idea is you can enter dinner reservations into the system and then get back the next person to be served, where the ReservationNumber sets each person's priority. The higher their number, the sooner they should get service.
The first thing to do is redo the Heap code. Visual Studio's "rename" capability is your friend!!
It currently stores an object of type Node in each element of the array. Modify all the code to instead store and retrieve objects of type Person. I created that class for you already.
The Heap code makes decisions based on each node's property "NodeValue". You need to modify the code to instead makes decisions based on each person's property "ReservationNumber".
Now move over to the Form code's button methods.
Edit the buttonAddReserClick event method in the form code to add a new reservation to the heap. After placing the reservation, this method should clear the input text boxes.
Edit the buttonGetReserClick event method to get back the highest reservation from the Heap and display the results.
Before it tries to get a reservation back from the Heap, use the IsEmpty method to make sure there is more reservations. If there is not, clear the first and last name fields, and write a message in the textBoxResNoOutput textbox that says No More Reservations".
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
