Class BankAccount

java.lang.Object
  extended by BankAccount

public class BankAccount
extends java.lang.Object

A simple Bank Account for Javadoc-ing


Field Summary
(package private)  double balance
           
 
Constructor Summary
BankAccount()
          Creates a BankAccount with zero balance
BankAccount(double balance)
          Creates a BankAccount with given balance
 
Method Summary
 void deposit(double money)
          Puts more money in the account
 double getBalance()
          Returns the current balance
 boolean withdraw(double money)
          Withdraws given amount of money (or not!)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

balance

double balance
Constructor Detail

BankAccount

public BankAccount()
Creates a BankAccount with zero balance


BankAccount

public BankAccount(double balance)
Creates a BankAccount with given balance

Parameters:
balance - initial balance
Method Detail

deposit

public void deposit(double money)
Puts more money in the account

Parameters:
money - amount to deposit

withdraw

public boolean withdraw(double money)
Withdraws given amount of money (or not!)

Parameters:
money - amount to withdraw
Returns:
success of withdrawal

getBalance

public double getBalance()
Returns the current balance

Returns:
current balance