MinimumAccount.java is another basic class of a package of bank accounts. It implements an account that has a minimum balance. If the balance falls below the minimum, then a fee is charged. This class is abstract. This class extends ProtectedAccount.
ConstructorReceives: the name, pin, minimum, and penalty amounts for the account:
Postcondition: superclass constructor has been called, the minimum and penalty have been set:
Over ride the basic withdraw method.Receives: the amount of the withdraw and a trial pin
Postcondition: superclass withdraw is called. If the balance falls below the minimum, the given fee will be charged.
Over ride the fee computation method.Postcondition: superclass computeFees is called. If the balance has fallen below the minimum this month, add the fee value to the other fees.
Back to the package documentation index