Page 1 of 1

poir Save An 5. b. A portfolio consists of various stocks that a person or organization owns, as discussed. A portfolio

Posted: Thu May 05, 2022 2:00 pm
by answerhappygod
Poir Save An 5 B A Portfolio Consists Of Various Stocks That A Person Or Organization Owns As Discussed A Portfolio 1
Poir Save An 5 B A Portfolio Consists Of Various Stocks That A Person Or Organization Owns As Discussed A Portfolio 1 (23.49 KiB) Viewed 37 times
poir Save An 5. b. A portfolio consists of various stocks that a person or organization owns, as discussed. A portfolio has owner id, password, date created, and stocks the owner has. The stocks in a portfolio will be maintained in an array of Stock objects. For example, a portfolio can consist of 100 shares of Apple stocks, 500 shares of Google stocks, 200 shares of Microsoft stocks, etc. Write a Java class named Portfolio that represents a portfolio by following the instruction below: all member data described above. Each of them must be private accessor and mutator methods for owner id and password default constructor and another constructor with owner id as input parameter The date created should be set to the current date in the constructors. (Hint: use Date class) Accessor method for the date created. addstock method that adds a stock to the portfolio. In a portfolio, it can have up to 50 different stocks In order for this to work, Portfolio class will need the number of stocks as member data. If the stock being added already exists, Le same stock symbol, increase the number of shares only. If not, add the stock to the Stock array if there is room. The method header should look as follows: public void addstock (Stock stock) public String tostring() method that returns a string that represents all the stocks in the portfolio Maka