public class BankAccount {
   // private data (instance fields) here
   private double myCurrentBalance;

   // Constructors
   /**
       Constructs a bank account
   */
   public BankAccount() {
      // initialize current balance to 0
     myCurrentBalance = 0;
   }

   /**
       Constructs a bank account with a given balance
       @param initialBalance the initial balance
   */
   public BankAccount(double initialBalance) {
      // initialize current balance to initialBalance
     myCurrentBalance = initialBalance;
   }

   // methods
   /**
       Deposits money into the bank account.
       @param amount the amount to deposit
   */
   public void deposit(double amount) {
      // Add amount to balance
     myCurrentBalance = 
       myCurrentBalance + amount;
     // myCurrentBalance += amount;
   }

   /**
       Withdraws money from the bank account
       @param amount the amount to withdraw
   */
   public void withdraw(double amount) {
      // Subtract amount from balance
     myCurrentBalance = 
       myCurrentBalance - amount;
   }

   /**
       Gets the current balance of the bank account.
       @return the current balance
   */
   public double getBalance() {
      // Return balance
      return myCurrentBalance; 
   }
   
   /* I want a toString method so I can use
    * System.out.println on objects
    */
   public String toString() {
     return "a BankAccount object with a balance of "
       + myCurrentBalance;
   }
}