Question
Code the following in C++: PLEASE READ CAREFULLY Please use a class to adhere to the program specification below. This is only the first class
Code the following in C++: PLEASE READ CAREFULLY
Please use a class to adhere to the program specification below. This is only the first class used in a project I'm working on so this won't necessarily be a finished program. ANY HELP AT ALL IS GREATLY APPRECIATED. I will upvote and tell my friends with chegg to upvote too! Thank you!
=============================================================================
The restaurant tables array, we have the sizesumber of tables for each
restaurant and also, the control variable called NUMHFCS. NUMHFCS will enable us to add or subtract a restaurants.
GIVEN CODE:
// Global Constants
// Number of restaurants
const int NUMHFCS = 8;
// Number of tables in each restaurant
const int HFCSIZES[NUMHFCS] = {19, 15, 24, 33, 61, 17, 55, 37};
/ /Names of restaurant (This array is parallel to HFCSIZES)
const std::string RESTAURANT[NUMHFCS] = {"The Salubrious Bistro", "What the Kale?", "Lettuce Enjoy", "Vegan Nights", "Pasta is a Planet", "The Meatless Miracle", "The Pesky Pescatarian", "The Fine Fettle"};
Build each restaurant by creating dynamic objects (on the heap).
Each time we put our patrons at a table for the chosen restaurant, we will create an
object from our class aptly named Restaurant. Each Restaurant object will contain the following:
restaurant number (short int)
table number (short int)
a unique five-digit patron ID number (int)
patron name (string)
patron meal number (short int)
There has to be a local pointer allocated for each object. One idea is
for that pointer to be in an array of local pointers to the type Restaurant (something
like Restaurant *arrOfPtrs[261], or eight arrays of pointers).
Restaurant number is one of the available healthy food restaurants. This is entered into the program, and must be
validated and within range (use NUMHFCS). The program must determine the next available free
table (table number). If there are none then the program should place the user on the waiting list. Notice the program should determine to branch away from or continue on with the
table assignment process when a restaurant is full. (You MUST use a queue).
Patron ID is a randomly generated number. Name is entered by the
user into your program, and must be validated (cannot be blank). Meal
number is the number of the meal and is entered and must be validated and
within range (use NUMMEALS).
Healthy table numbers Restaurant Number 1-19 1-15 1-24 1-33 1-61 1-17 2 3 4 5 6 7 1-55 8 1-37 Healthy table numbers Restaurant Number 1-19 1-15 1-24 1-33 1-61 1-17 2 3 4 5 6 7 1-55 8 1-37Step 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