You work for The Cutting Edge Rental Company (CER). They need an application that will determine the cost of rental for their customers. They only rent four different items. The items and their per day rental fees appear below. See image.
CER has a discount system that alters this basic price. CER rents to both retail and wholesale customers. Wholesale customers get a 25% discount. Retail customers get a discount that varies according to how many different kinds of items they rent, how many different units they rent and for how long they rent the item(s). See image.
Additional business rules:
Considerations and some things that you must do.
Your total Cost for ___ number of item(s) for ___ number of day(s) is _____
plus tax.
This reflects a ___ % discount of _____ .
Your bill is _____ . This includes a 6 % tax of ______ .
You are a valued wholesale/retail customer of ours.
The last sentence says either “wholesale” or “retail” based on the user's entry.
Examples:
Chain Saw 1
Lawn Mower 0
Trimmer 0
Chipper 0
Number of days 1
Wholesale customer left blank
No discount for one kind of an item, one unit and less than two days.
Chain Saw 1
Lawn Mower 2
Trimmer 1
Chipper 3
Number of days 3
Wholesale customer left blank
1 chainsaw = 20
2 lawn mowers = 30
1 trimmer = 10
3 chippers = 90
total = 150
at 3 days = 150 * 3 = 450
Not wholesale, therefore the following discounts apply.
Total number of different kinds of items = 4 - discount of 10 %
Total number of units rented = 7 - discount of 6 %
Total number of days = 3 and a chipper is rented which is worth 3%
per day
therefore 2 days times 3% = 6% (first day is not counted)
Then 10 + 6 + 6 = 22 % total discount.
Discount amount = 450 * .22 = 99.00
Charge for rentals = 450 - 99 = 351.00
Tax = 351 * .06 = 21.06
Final bill = 351 + 21.06 = 372.06
Chain Saw 3
Lawn Mower 2
Trimmer 4
Chipper 2
Number of days 5
Wholesale customer left blank
When the retail customer's discount rate exceeds 25%, 25% discount is
applied.
The output See image.