MinimumAccount

 

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.

 

public MinimumAccount ( String name, String pin, double min, double penalty)

Constructor

Receives: the name, pin, minimum, and penalty amounts for the account:

Postcondition: superclass constructor has been called, the minimum and penalty have been set:

 

public void withdraw( double amount, String pin)

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.

 

public double computeFees()

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


Back to the Introduction


Copyright 2000 by Prentice Hall. All rights reserved.