An investor has a file of stocks. The file contains the number of stocks on the first line followed by the stock data. Data for each stock consists of an integer id (given first) and the number of stocks owned (second). Create the class Stock with a constructor, a read function to read the stock from the file and a print function to print the stocks member data items to the screen. Modify the Application class run function to read the file of stocks and print each stock value.
The data file can be obtained by clicking here .