/** This is a bank account for our customer. */
/* We have added javadoc comments - because this
 * comment does not start with a double asterisk **
 * it is NOT a javadoc comment.  Javadoc comments
 * are useful for automatic creation of software
 * documentation. Hava a quick look at the javadoc
 * handbook available off the java links on the course
 * website, or directly at:
 * http://www.cs.toronto.edu/~dianeh/148/handbook/javadoc/
 * Javadoc comments are required - including @param, @return
 * @throws for all parts of your second assignment.
 */
public class BankAccount {
  /** name of account holder. */
  private String name ;
  /** balance in the bank account. */
  /* this is an instance variable */
  private double balance;
  /** this method withdraws amount a from the 
   *  balance and returns the new balance.
   * @param a the amount to be withdrawn.
   * @return the amount remaining in the bank account.
   */
  public double withdraw(double a) {
    balance = balance - a;
    return balance;
  }
  /** adds the name n to the BankAccount.
   * @param n name of the bankaccount owner.
   */
  public void setName(String n) {
    name = n;
  }
  /** return the BankAccount  name 
   * @return the name of the bank account owner.
   */
  public String getName(){
    return name;
  }
  /** deposit amount a into Bankaccount
   *  and return the new balance.
   * @param b amount to be deposited.
   * @return the balance after deposit.
   */
  public double deposit(double b) {
    balance += b;
    return balance;
  }
}


