TDD training kata inspired by trainigng provided by Industrial Logic.
Your task is to write a program that will calculate the bonus a salesperson can get. To calculate the bonus, you need to know the salesperson's total sales amount, their quota, their commission percentage and any tax that must be deducted.
Examples:
Sales | Quota | Commission Percentage | Tax Percentage | Resulting Value |
---|---|---|---|---|
12000 | 11000 | 10 | 10 | 90.0 |
13000 | 15000 | 10 | 10 | 0.0 |
15000 | 15000 | 10 | 10 | 0.0 |
A member of a sales team is entitled to a bonus if their team's total sales exceeds their team's quota.
Examples:
Sales | Quota | Commission Percentage | Team Members | Resulting Value |
---|---|---|---|---|
12000 | 11000 | 10 | 4 | 25.0 |
12000 | 11000 | 50 | 5 | 100.0 |
13000 | 15000 | 10 | 4 | 0.0 |
12000 | 12000 | 10 | 4 | 0.0 |
12000 | 11000 | 10 | 0 | 0.0 |