Class Portfolio

java.lang.Object
  extended by Portfolio

public class Portfolio
extends java.lang.Object


Constructor Summary
Portfolio()
          Creates a Portfolio with default checking account.
Portfolio(BankAccount checking)
          Creates a Portfolio with given checking account.
Portfolio(Portfolio p)
          Creates a copy of the given portfolio.
 
Method Summary
 BankAccount getChecking()
          Returns the checking account.
 void setChecking(BankAccount c)
          Sets the checking account in the portfolio to the given account.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Portfolio

public Portfolio(BankAccount checking)
Creates a Portfolio with given checking account.

Parameters:
checking - Checking account

Portfolio

public Portfolio()
Creates a Portfolio with default checking account.


Portfolio

public Portfolio(Portfolio p)
Creates a copy of the given portfolio.

Parameters:
p - Portfolio to be copied.
Method Detail

getChecking

public BankAccount getChecking()
Returns the checking account.

Returns:
Checking account

setChecking

public void setChecking(BankAccount c)
Sets the checking account in the portfolio to the given account.

Parameters:
c - New checking account