Hi there so I have been working on a programming assignment dealing with stocks. Here is what we have to do for the program:
You will need to use files, arrays, and classes stock, customer, and broker.
Modify the broker class 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 the stock class and create stock objects (in Broker) 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 on the top line:
Modify the customer class and create customer objects (in Broker) from the descriptions read from the customer.dat file. Note that all customers
start with empty portfolio and can have a portfolio that contains many different stocks – as many as described in the stock.dat class.
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.