Stock Market Project

Through group discussion we'll develop a simplfied Stock Market platform as a means to further explore techniques and algorithms for manipulating one- and two-dimensional arrays (vectors and matrices, respectively).

  1. Create a project called StockMarket and a minimal driver file.
  2. Add the class field, market to StockMarket that references an array of Stock objects.
  3. Create a class, Stock, that implements our agreed upon UML.
  4. Create the text file, Stocks.txt, to be read by the driver that contains the data below. Insert the number of stocks as the first line of the file.
    Symbol
    Name
    ACES
    POT
    Potash Corp. of Saskatchewan
    Lakshay
    RIM
    Research in Motion Ltd.
    Arshia
    RY
    Royal Bank of Canada
    Alex
    BIR
    Birchcliff Energy
    Alan
    SU
    Suncor Energy Inc.
    Adrian
    CM
    Canadian Imperial Bank of Commerce
    Tim
    ENB
    Enbridge Inc.
    Hunter
    BNK
    Bankers Petroleum
    Reuben
    ABX
    Barrick Gold Corp.
    Jack
    BMO
    Bank of Montreal
    Juhan

  5. Read the Stocks.txt file. After reading the first line, instantiate the market array to the correct capacity. Read the remaining data and us it populate the market array.
  6. Prepare the historical data file. Each of you is asked to go to Yahoo Finance Canada and locate the historical price data for your company (see table above). Scroll down past all the data and click the link to Download to Spreadsheet. Delete the first and last columns (Date and Adjusted Close), leaving only Open, High, Low, Close and Volume. Delete the first row of headings. Save as a tab delimited text file with the stock symbol as the file name (eg. ABX.txt). Attach your file to an email to the forum with the stock symbol as the Subject Line.