i have some question regarding arrays and structure.
Q. a condominium has 3 BBQ pits available for booking.you are tasked to design and develop a program to allow user to book a pit given a reservation date.if there is no available date, user is prompt to re-enter the date or "E" to exit the system.
i am required to use the following structures and variables.
struct BBQ
{
int BBQ Number;//pit number
string cal_date;//calendar date
bool available;//statues of pit-true if available for booking
};
struct Details
{
string ID;//booking ID
string name;//name of resident
string addr;//address of resident
string rdate;//reservation date of pit
double fees;//amt charged for pit
};
const int SIZE = 3;
Booking b; // booking for pit
BBQ pits[365][SIZE]; //2D array that store the pit info for the year.
Qa. Develop the function, initialize() that initializes the values for 2D array, pits. function prototype is void initialize().
Qb. Design and develop a function findBBQ() to find available BBQ pit for booking. the function prototype is BBQfindBBQ(string). the function searches the 2D array, pits to look up for the available pits with the given reservation date which is pass in as a string variable. it returns the structure record of type BBQ to the calling function. if there is no available pit, set the BBQNumber to 0.
Qc. Design and develop a function, bookBBQ() to book the pit when one is available for booking. The function prototype is void bookBBQ(Details,BBQ). the function sets the respective values of the structure record, Booking b to the pass-in arguments value.
sorry for the long question, im new in C++ and i have no idea how to go about doing it. Thanks for the help in advance.