Question: ****This needs to be written in C#**** Please remember this is an entry level course, so the code must reflect that. I need to create

****This needs to be written in C#****

Please remember this is an entry level course, so the code must reflect that.

I need to create a program for Vacation Rentals App. The guests can rent beach equipment such as flotation rafts, Swimming gear, chairs, umbrellas and row boats. The application will first get the guest name, all the items rented, then the qty of each item rented and total minutes rented. The guests can rent as many items as they would like, and multiple quantities. We can assume that all items are rented for the same time frame. So a guest can rent 3 chairs, and swimming gear but all for 60 minutes.

This program will require three classes, the VacationRentalsApp which will be the entry point of the program, a Rental class which you will be using to create the rented objects, and a Guest class which holds all guest information.

VacationRentalsApp This is where the program begins. This should create a guest object. The guest object will hold the guest name, contract number and an array of Rental objects. The app should first display the welcome message, and then get the guest information as well as the rental information. All of the info displayed and gathered in the main() method should be called from methods within the BeachRentalsApp class.

Contains the following methods:

The main() instantiates a Guest object, and as many Rental objects as required. Rental objects are then stored in an array data element in the Guest object i.e. itemsRented[ ]. The main method should call methods to get input and display data. Methods to call in this class should include:

1.) Display a welcome message

2.) Get the guest name

3.) Get the contract number

4.) Gets minutes rented a guest has to rent for a minimum of an hour and no more than 8 hours.

5.) Gets the item to rent and qty

6.) displays the static array from the Rental Class

7.) Gets the qty and item to rent

Displays the final rental info:

8.) Guest name

9.) For each item: item rented, total cost of rental (price of item * rental period)

10.) A final total of all items rented

Guest A class that holds guest info

Properties:

Guest Name

Contract Number (ie K168)

# Hours rented

# Minutes rented

Items Rented (an array of rental objects)

Constructors as appropriate: requires a minimum of guest name to instantiate a guest object.

Methods:

Sets the contract Number. If no number is provided, create a random contract number. It should start with the first letter of the customer name, and then a randomly generated additional 4 numbers.

Accepts the minutes rented and sets the class data fields (# hours rented, # minutes rented) accordingly.

Rental A class that describes a rental

Constructors as appropriate. Users of this class need a minimum of a rental item to instantiate an object.

Static members:

- an array of the rental items available (such as flotation rafts, swimming gear, chairs, umbrellas, row boats)

- The hourly rate for each of the following is:

flotation raft $15

swimming gear $25

chairs $8

umbrella $10

row boat - $40

Properties:

item Rented (ie umbrella)

qty rented (ie 4 umbrellas)

total rental price (ie umbrella cost $10 * rental period * 3 umbrellas)

Methods

static method that displays the items available for rental

calculates total price - calculated in half hour increments. For example. An umbrella costs $8 per hour. If the rental period is 30 minutes, the price is $4. Otherwise the price is $8. So a rental of 75 minutes costs $12. (1 hour is $8 and additional up to 30 minutes is $4) A rental of 45 minutes costs $8.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!