class SavingsAccount extends BankAccount {
   double rate;
   public SavingsAccount (int account, double balance, double rate) {
     super (account, balance);
     this.rate = rate;
   }

   public void addInterest () {
     balance += balance * rate;
     System.out.println ("Interest added to account " + account);
     System.out.println ("New balance: " + balance);
   }
  
   public String toString() {
    return (super.toString() + "...the interest rate is: "+rate);
   }
}
