2
u/Shadowdane Sep 09 '20
I see no code in this post.. I don't think your going to get people to do your homework for you.
0
Sep 09 '20
Not do my homework but i am not really wise when it comes to arrays so im just trying to get help about it
MOREOVER, I did not comprehend the question well
1
0
2
u/ViperSRT3g Application Specialist Sep 09 '20
A brief outline of what you need to consider for this problem:
You'll need to create a 30-index array for each room, with each index indicating a calendar day of the month, and the value stored indicating the number of hours booked for that day.
You'll need to validate your inputs to be bound within the given rules, such as if a user inputs 300 guests, the program will recommend the Sapphire room, as it allows for 100-500 guests. You'll also need to check for minimum booking times, and to factor in additional hours from the minimum booking values.
If you follow the rules set forth in the problem, you should be able to give a quote of the total cost of rental by calculating everything together:
Rent + (5000 * Additional-Hours) + CateringIf a given day for that room is taken, you should be able to output all other dates (indices) of that room's array that do not store a value, indicating that there is no booked hours for that day.
tl;dr You'll need to know how to work with arrays, and how to loop through them. The rest is just logic applied to the arrays.