Copyright © – Sudharsan Iyengar
CS – 234 Individual Programming Assignment: #3(c) Due: 12/8/24
You will need to use files, arrays, and classes stock, customer, and broker from assignment 3(b).
Modify the broker class to read input files called stock.dat and customer.dat
The first line in stock.dat has an integer that indicates how many stocks are described in the file.
Subsequently, each stock is described as follows, one stock description per line.
Stock label (String) initial volume (int) price (double)
Modify Broker class to create stock objects from the descriptions read from the stock.dat file.
The first line in customer.dat has an integer that indicates how many customers are described in the file.
Subsequently, each customer is described as follows, one customer at a time
Customer Name Account Balance
Modify Broker class to create customer objects (in Broker) from the descriptions read from the customer.dat file.
Note that all customers start with empty portfolio (0 for all possible stocks they can buy/sell). Since the names of the stocks are only known in the broker – you can create an empty portfolio (array of stocks) in the broker and set it for each of the customers.
Then,
First – displays the Current state of all the stocks. Then displays the all the customers and their portfolio.
Then, provide a menu for the user to:
Select a customer, view their portfolio and or trade stocks as in 3(b).
Until the session is terminated when exit option.
Finally – display the current state of all the stocks. Then display all the customers and their current portfolio.
The updated complete project must be uploaded. Due:
Midnight SATURDAY 12/02/23.