Class Account

java.lang.Object
  
public class Account
extends java.lang.Object

Class for representing bank accounts

Version:
0.9
Author:
Tomáš Pitner

Constructor Summary
Account(Person owner)
          Creates a new account with a non-null owner Person
 
Method Summary
 void add(int amount)
           
 int getBalance()
           
 void info()
           
static void printAccountCount()
           
 void transferTo(Account target, int amount)
           
 
Methods inherited from class
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Account

public Account(Person owner)
Creates a new account with a non-null owner Person

Parameters:
owner - must not be null
Throws:
java.lang.NullPointerException - if owner is null
Method Detail

add

public void add(int amount)

getBalance

public int getBalance()

info

public void info()

printAccountCount

public static void printAccountCount()

transferTo

public void transferTo(Account target,
                       int amount)