Bank Management - Part 4
Interface: a contract of behavior.
A class that implements an interface must override all of its methods.
Based on the requirements,
Chequing implements a
Taxable interface. Add a
void tax(double income) method inside
Taxable and override it inside
Create a unit test named
$4,000into the chequing account.
tax()for an income of
- assert the resulting balance is
You can find the taxable income and tax rate inside