Design a program for a hotel with 10 rooms using code which is similar to the hotel array code
given in the lecture notes. Start by checking the code in the notes works for you.
Once the basic code runs, then put the code that ‘Views All rooms’ and ‘Adds customer to room’,
into separate procedures. The main body of the program should have a loop; and in the loop the
program should call (or use) these two procedures as necessary. The procedures then return to the
loop to go around again. You should test that this all works as required.
Then add a menu system, which allow the user to choose what they want to select. Enter an ‘A’ to
add a customer to a room, and a ‘V’ to view all rooms. (To do a menu see the ‘arith’ program in the
notes about ‘Ifs’ from last semester – or see the ‘arith’ program code which is towards the start of
the code examples [link is on the videos web page]) When an ‘A’ is pressed it should do the Add
procedure, or a ‘V’ should do the View procedure.
One by one, add extra procedures to do each of the following. The user should be able to choose
from the menu what the program does.
E: Display Empty rooms,
D: Delete customer from room,
F: Find room from customer name (the search should not be case sensitive).
S: Store program array data into a plain text file,
L: Load program data back from the file into the array.
O: View rooms Ordered alphabetically by name. Write the sort algorithm code yourself rather
than using an in-built sort function
Place your order now to enjoy great discounts on this or a similar topic.
People choose us because we provide:
Essays written from scratch, 100% original,
Delivery within deadlines,
Competitive prices and excellent quality,
24/7 customer support,
Priority on their privacy,
Unlimited free revisions upon request, and
Plagiarism free work,