java.lang.Object
public class Account
Class for representing bank accounts
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 |
---|
public Account(Person owner)
owner
- must not be null
java.lang.NullPointerException
- if owner is nullMethod Detail |
---|
public void add(int amount)
public int getBalance()
public void info()
public static void printAccountCount()
public void transferTo(Account target, int amount)