/**
 * A bank account.
 */  
public class BankAccount {
  
  /** The last name of the account owner. */
  private String lastName;
  
  /** The first name of the account owner. */
  private String firstName;
 
  /** The balance of the account. */
  private double balance;
  
  /** The account number. */
  private int accountNumber;
  
  /**
   * Create a new bank account with an 
   * initial balance of $20.
   * 
   * This is a constructor.
   * The name of the constructor is the same
   * as the name of the class.
   */
  public BankAccount() {
    this.balance = 20;
  }
  
  /**
   * Create a bank account with the balance
   * set to the given amount.
   */
  public BankAccount(double a) {
    this.balance = a;
  }
  
  /**
   * Create a bank account with the balance
   * set to the given amount, the first name
   * set to f and the last name set to l.
   */
  public BankAccount(double a, String f, String l) {
    this.balance = a;
    this.firstName = f;
    this.lastName = l;
  }
  
  /**
   * Withdraws the given amount from
   * the bank account.
   * 
   * - The code within the {} is called the
   * method body.
   * - The variable "amount" only exists 
   * within the method withdraw.
   * - parameter: a variable defined in the
   * header of a method (e.g., amount)
   */ 
  public void withdraw(double amount) {
    this.balance = this.balance - amount;
    
    // This is equivalent:
    // this.balance -= amount;
  }
  
  /**
   * Return the balance.
   */
  public double getBalance() {
    return this.balance;
  }
  
  /**
   * Deposit money in the bank account.
   */
  public void deposit(double amount) {
    this.balance = this.balance + amount;
  }
  
  /**
   * Return the first name of the account owner.
   */
  public String getFirstName() {
    return this.firstName;
  }
}
