A bank account charges $10 per month plus the following check fees for a commercial checking account:
- $.10 each for fewer than 20 checks
- $.08 each for 20-39 checks
- $.06 each for 40-59 checks
- $.04 each for 60 or more checks
Write a program that asks for the number of checks written for the month. The program should then calculate and display the bank's services fees for the month.
Breaking it down
- Create a method called checkFee that returns a double and refactor the logic to calculate the total check fee into this method.
- Write a unit test for checkFee and for the determining the check fees, is there an error?