public class SavingsAccount
extends java.lang.Object
Constructor and Description |
---|
SavingsAccount()
Initializes this object with no posted transactions and a balance
of $0.00.
|
Modifier and Type | Method and Description |
---|---|
double |
getBalance()
Returns the balance of this account.
|
java.util.Set<Transaction> |
getTransactions()
Returns a set of transactions, sorted by natural ordering.
|
void |
post(Transaction t)
Posts the specified transaction to this account.
|
public SavingsAccount()
public double getBalance()
public void post(Transaction t) throws java.lang.NullPointerException
t
- The Transaction
to post.java.lang.NullPointerException
- if the specified
Transaction
is null.public java.util.Set<Transaction> getTransactions()
Transaction.compareTo(Transaction)