Part 1: Commission Calculator
- Using Eclipse, write a Java app that takes numerical input from a user
- The app should calculate commission based on this chart used by the retail store.
Sales Range |
Commission |
above 10000$ |
30% |
5001 - 9999$ |
20% |
1001 - 4999$ |
10% |
below 1000$ |
N/A |
- Example: if a user enters 7677 as their sales figure, it should calculate commission at 20%.
- A movie cinema does price discounting depending on a customer's age.
- The app prompts a user to enter their age on the Eclipse console after which it checks whether the user meets the discount conditions.
Age range |
Ticket Price |
Normal ticket |
7 Euros |
Below 5 |
60% Discount |
Over 60 |
55% Discount |
- Write the app so that the conditions above are met and the correct ticket price is returned.
Extra features
If done with the first part of the exercise with time to spare add the following feature.
- Have the app prompt normal ticket buyers for the number of tickets they wish to buy.
- For every two or more tickets sold, give a 30% discount.