/** This is a bank account for our customer */
public class BankAccount {
  private String name ;
  private double balance;
  /** this method withdraws amount a from the 
   *  balance and returns the new balance
   */
  public double withdraw(double a) {
    balance = balance - a;
    return this.balance;
  }
  /** adds the name to the BankAccount */
  public void setName(String n) {
    this.name = n;
  }
  /** return the BankAccount  name */
  public String getName(){
    return this.name;
  }
  /** deposit amount a into Bankaccount
   *  and return the new balance 
   */
  public double deposit(double b) {
    balance += b;
    return this.balance;
    
  }
  /** calculates principle interest at the rate  r given.
   */
  public double calcInterest(double r) {
    this.balance += (this.balance * r);
    return this.balance;
  }
}
