7
answers
1
watching
182
views

 Restaurant Reservation Problem 
A small restaurant has just purchased a computer for its new automated reservation
system. You have been asked to develop the new system. You’re to write an application
to reserve available tables of the restaurant (the capacity of the restaurant is 10 tables).
The reservation fees is 10$ per person. Use a one-dimensional array of type Boolean to
represent the state of tables of the restaurant. Initialize all the elements of the array to false
to indicate that all the tables are not reserved. The user can choose his table number (from
1 to 10) if it is available. As each table is reserved, set the corresponding element of the
array to true to indicate that the table is no longer available. Your application should never
reserve a table that has already been reserved. If the table is available, the user can enter
the number of persons with maximum limit five persons. The system then calculates for
the user the total fees according to the number of persons. The system should reject any
reservation request for more than five persons. The reservation process should
continuously run for other customers until the user of the application explicitly ends it with
input -1

For unlimited access to Homework Help, a Homework+ subscription is required.

Unlock all answers

Get 1 free homework help answer.
Already have an account? Log in
Already have an account? Log in
Avatar image
Read by 4 people
Already have an account? Log in
Avatar image
Read by 4 people
Already have an account? Log in
Avatar image
Read by 4 people
Already have an account? Log in
Avatar image
Read by 4 people
Already have an account? Log in
Avatar image
Read by 4 people
Already have an account? Log in
Start filling in the gaps now
Log in