stockportfolio
Interface IStockBlock

All Known Implementing Classes:
AbsStockBlock

public interface IStockBlock

Information about one block of stock. Concrete implementations should have a constructor with parameters
stock
Date dateBought
double numShares, must be >0
double pricePerShare, must be >0


Method Summary
 double getPricePerShare()
          Tells the price per share of shares in this block
 double getShares()
          Tells the number of shares in this block
 java.lang.String getStock()
          Tells the stock which was bought or sold.
 java.util.Date getTransactionDate()
          Tells the date the stock was purchased.
 

Method Detail

getStock

public java.lang.String getStock()
Tells the stock which was bought or sold. This should be the "normalized" stock name (see instructions).

Returns:
a non-null String

getTransactionDate

public java.util.Date getTransactionDate()
Tells the date the stock was purchased.

Returns:
non-null date the stock was purchased

getShares

public double getShares()
Tells the number of shares in this block

Returns:
the number of shares, which is always >0.

getPricePerShare

public double getPricePerShare()
Tells the price per share of shares in this block

Returns:
the price per share, which must be >0