public class SavingsAccount extends BankAccount
{
    private double rate; //= 0.025;
	 private int savingsNumber; // = 0;
	 private String accountNumber;
	 
	 public SavingsAccount (String name, double initBalance)
	 {
	    super (name, initBalance);
       String temp;  // has to be declared AFTER call to super
		 rate = 0.025;
		 savingsNumber = 0;
       temp = super.getAccountNumber();
       accountNumber = temp + "-" + savingsNumber;
	 }// end constructor

	  // copy constructor described on page 569 of text	 
	 public SavingsAccount (SavingsAccount oldSavingsAccountObject, double initBalance)
	 {
	    super(oldSavingsAccountObject, initBalance);  
		 String temp;
		 savingsNumber = oldSavingsAccountObject.savingsNumber + 1;
       temp = super.getAccountNumber();  
	    accountNumber = temp + "-" + savingsNumber;		 
	  }// end copyconstructor
	    
	  public void postInterest ()
	  {
	      // calculates one month's worth of interest on the balance 
			// and deposits it into the account
			double tempBalance;
			tempBalance = getBalance();   
			tempBalance = tempBalance + tempBalance * (1.0/12.0) * rate;
			setBalance(tempBalance);
	  }// end postInterest
	  
	   /**accessor method to account number
   	@return the account number*/
       public String getAccountNumber()
      {
	  			return accountNumber;
      } // end overRidden getAccountNumber;
		
}// end class		 
