//for this class the benefits are from maintaining the min balance
//There is no checkcharge if balance is maintained and the interest
//rate is higher.

class SpecialCheckingAccount extends CheckingAccount
{
  private double minBalance;
  private double intRate;
  
  public SpecialCheckingAccount(int idNum,double startBal,
                  double chkCharge,double minBal,double rate)
   {
      super(idNum,startBal,chkCharge);
      minBalance=minBal;
      intRate=rate;
    }               
    
    public void clearCheck(double amount)
    {
      if(currentBalance()>=minBalance)
        decreaseBalance(amount);
        else
          super.clearCheck(amount);
     }     
      
    public double monthlyInterest()
    {
      if(currentBalance()>=minBalance)
        return (currentBalance()*(intRate/12.0));
        else
          return super.monthlyInterest();
                  
    }  
    
    public String toString()
    {
    	return "";
    	
    }

}
