|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPortfolio
public class Portfolio
Constructor Summary | |
---|---|
Portfolio()
Creates a Portfolio with default checking account, null stock, and zero shares of that stock. |
|
Portfolio(BankAccount checking,
Stock myStock,
int numShares)
Creates a Portfolio with given checking account, and given number of shares in the given stock. |
|
Portfolio(Portfolio p)
Creates a copy of the given portfolio. |
Method Summary | |
---|---|
double |
getPortfolioBalance()
Calculates the total portfolio balance. |
java.lang.String |
toString()
Returns a string representation of the portfolio. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Portfolio(BankAccount checking, Stock myStock, int numShares)
checking
- Checking accountmyStock
- StocknumShares
- Number of shares in the stockpublic Portfolio()
public Portfolio(Portfolio p)
p
- Portfolio to be copied.Method Detail |
---|
public double getPortfolioBalance()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |