Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. //BankAccount.java  MrG 2011.0930
  2. public class BankAccount
  3. {
  4.     private double balance;
  5.  
  6.     public BankAccount()
  7.     {
  8.         balance=0;
  9.     }
  10.  
  11.     public double getBalance()
  12.     {
  13.         return balance;
  14.     }
  15.  
  16.     public void deposit(double amount)
  17.     {
  18.         balance=balance+amount;
  19.     }
  20.  
  21.     public void withdraw(double amount)
  22.     {
  23.         balance=balance-amount;
  24.     }
  25. }
  26.  
  27.