#include "..\traders\JWilliam2.h" #include "..\traders\JWilliam3.h" #include "..\market\Trader.h" struct StockInfo { int Ticker; double Worth; }; struct SellInfo { int Ticker; int Shares; }; /* Trader JWilliam1 is supposed to: 1. purchase 10 stocks based on their 'worth' (PE_Ratio + EarningsPerShare) 2. keep these stocks as long as they are not decreasing in value 3. sell any stocks that are decreasing in value, and purchases the stocks with the highest 'worth' that are not already owned */ class JWilliam1: public Trader{ StockInfo m_Best10[10]; double m_Prices[10]; SellInfo m_ToSell[10]; int m_SellCount; int m_TimeThrough; void FindBest(); // finds the 10 'best' (highest worth) stocks public: JWilliam1(int TN); virtual void Think(); virtual int Trade(); };