#include "..\traders\mdunn.h" #include //mdunn1 Trader mdunn1::mdunn1( int TraderNum ) : Trader(TraderNum) {}; void mdunn1::Think() { cout<<"I'm thinking that I'll spend half my money on one stock and then let my profits rise!!!"; }; int mdunn1::Trade() { Broker *MyBroker; //create broker object MyBroker=GetBroker(); int counter =0; double balance; double spend; int tckr; balance = MyBroker->GetBalance(); spend = balance/2; tckr = 5; if(counter=0){ MyBroker->Buy(tckr, spend); counter++; return 0; } else return 0; }; //mdunn2 Trader mdunn2::mdunn2( int TraderNum ) : Trader(TraderNum) {}; void mdunn2::Think() { cout<<"I'm thinking that I'll continuously trade on two stocks."; }; int mdunn2::Trade() { Broker *MyBroker; MyBroker=GetBroker(); int big=3; int little=2; int rem = big%little; int tckr = 15; int remainder; if(remainder = 1){ MyBroker->Buy(tckr, 100); big++; tckr++; MyBroker->Buy(tckr, 100); tckr--; return 0; }//end of if else{ MyBroker->Sell(tckr, 80); big++; tckr++; MyBroker->Sell(tckr, 80); tckr--; return 0; }//end of else };//end of mdunn2::Trade() //mdunn3 Trader mdunn3::mdunn3( int TraderNum ) : Trader(TraderNum) {}; void mdunn3::Think() { cout<<"I will circulate through the stocks buying two shares at a time"; }; int mdunn3::Trade() { StockMarketInfo Info; int i; Broker *MyBroker; MyBroker=GetBroker(); int tckr=0; //Buy 2 shares of each stock // for(i=0, iBuy(tckr, 2); tckr++; } return 0; };