Skip navigation links
A B C G H I L M N P Q R S T 

A

addQuote(Quote) - Method in class lab01.Quotes
Adds a quote to the list of quotes Will only add the quote if either no previous quote exists for the specified stock (company) or if this quote is newer than the quote on file for this stock

B

buy(String, int, double) - Method in class lab01.Portfolio
Purchase a new holding of specified number of shares for the specified company.
buyTrigger(String, double, int, Quote) - Method in class lab01.Portfolio
Buy shares if the price is below a trigger price

C

companyEquals(String) - Method in class lab01.Quote
 
currentValue(Quotes) - Method in class lab01.Portfolio
Find the current value of this portfolio, based on the quotes in the board parameter

G

getCompany() - Method in class lab01.Holding
 
getCompany() - Method in class lab01.Quote
 
getPrice() - Method in class lab01.Quote
 
getPrice(String) - Method in class lab01.Quotes
Look up the latest quote for a stock
getPurchasePrice() - Method in class lab01.Holding
 
getShares() - Method in class lab01.Holding
 

H

Holding - Class in lab01
Defines information about a specific stock holding
Holding(String, int, double) - Constructor for class lab01.Holding
Create a new holding based on parameters

I

isNewer(Quote) - Method in class lab01.Quote
Checks to see if this quote is newer than the argument

L

lab01 - package lab01
 

M

main(String[]) - Static method in class lab01.Tester
main function

N

netValue(Quotes) - Method in class lab01.Portfolio
Determine the net value of the portfolio, based on the current quotes in the board parameter

P

Portfolio - Class in lab01
Portfolio containing a list of holdings and cash balance
Portfolio(double) - Constructor for class lab01.Portfolio
Create a new portfolio with no holdings, and parameter specified initial cash balance

Q

Quote - Class in lab01
Keep track of the price of a single share of stock
Quote(String, double) - Constructor for class lab01.Quote
Create a quote with the current date/time based on parameters
Quote(String) - Constructor for class lab01.Quote
Create a quote with the current date/time based on a string
Quotes - Class in lab01
Keeps track of latest quotes for all stocks
Quotes() - Constructor for class lab01.Quotes
Create a new list of quotes

R

report(Quotes) - Method in class lab01.Portfolio
Generate a report (to "out") for this portfolio, based on the quotes in the board parameter

S

salesNet(int, double) - Method in class lab01.Holding
Figures out the net profit of selling shares at a specfic sales price
sell(int) - Method in class lab01.Holding
Sell specified number of shares of this holding Will not sell more shares than are in this holding If number of sold shares are reduced, a message indicates how many are actually sold
sell(String, int, double) - Method in class lab01.Portfolio
Sell shares from the portfolio (if you own them) for the specified price.
sellTrigger(String, double, int, Quote) - Method in class lab01.Portfolio
Sell specified shares if the sale prices is above a minimum trigger price

T

Tester - Class in lab01
Test out the streaming stock implementation
Tester() - Constructor for class lab01.Tester
 
toString() - Method in class lab01.Quote
 
A B C G H I L M N P Q R S T 
Skip navigation links