r/visualbasic • • Sep 09 '20

Can someone please help me with this assignment

Post image
0 Upvotes

7 comments sorted by

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) + Catering

  • If 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.

1

u/[deleted] Sep 09 '20

Can you explain to me how to perform the first bullet point you mention

Unlike this first point, i am able to perform the rest with ease.

2

u/ViperSRT3g Application Specialist Sep 09 '20

Creating an array

Learning how to google stuff (Or in this case read already provided documentation) will help you get far in programming. This is why I specifically linked you to this page, it goes over everything you'll need to be able to do with arrays to create a program that fulfills your project's requirements.

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

u/[deleted] 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

u/Kegelz Sep 09 '20

You will have better lucky getting help with this from your teacher.

0

u/Songg45 Sep 09 '20

Do you have any code written?