Question: Create a program called ConferenceChargesYourLastName .java that accepts the number of days per week the attendee will attend and a tier level. Pass those to
Create a program called ConferenceChargesYourLastName .java that accepts the number of days per week the attendee will attend and a tier level. Pass those to a method called determineConferenceCharges that returns the cost to charge the attendee. Return the cost to the console. Continue to prompt for days and tier levels until a sentinel value of 999 is entered for number of days.
| Days per week | |||||
| Tiers | 1 | 2 | 3 | 4 | 5 |
| Tier 1 | 100 | 190 | 270 | 340 | 400 |
| Tier 2 | 95 | 180 | 260 | 330 | 390 |
| Tier 3 | 90 | 170 | 250 | 320 | 380 |
| Tier 4 | 85 | 160 | 240 | 310 | 370 |
| Tier 5 | 75 | 150 | 230 | 300 | 360 |
To save time, you can use my array declaration and initialization:
int rates[][] = { {100, 190, 270, 340, 400}, {95, 180, 260, 330, 390}, {90, 170, 250, 320, 380}, {85, 160, 240, 310, 370}, {75, 150, 230, 300, 360} };
Create a test file to test your method to verify it is receive the correct value back. For example:
My method should return 100 if tier 1 and 1 days of attendance is passed into the determineConferenceCharges method.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
