Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is done in java coded with NETBEANS. 3. Jtable and Stocks Add a second frame: StockFrame Add a class Stock as shown below public
This is done in java coded with NETBEANS.
3. Jtable and Stocks Add a second frame: StockFrame Add a class Stock as shown below public class Stock \{ private string companyName; private int numberOfShares; //current number of shares a customer owns private double pricePerShare; //current price per share Add constructor Add getter properties Add methods: void PurchaseShares(int numberOfShares): this method should update the current number of shares boolean SellShares(int numberOfShares): this method also should update the current numberofshares double getinvestementValue(): should return total value of the stock which is equal the numberOfShares times the pricePerShare. Example: if you had 1000 shares and pricepershare is $90 then the investment value 100090=$90000 Create an ArrayList of Stocks, populate the list with 10 stocks the moment the application runs. Add a table and a button to this frame Add a method 'display' to display the list of stocks in the table Add another button that saves all the stocks in the list to a binary file Add a third button and the necessary gui to add a new stock to the list And save it to the file with the rest of the stocks Add appropriate GUI to allow you to update the pricepershare of the selected stock from table. Reflect the changes both in the stockList and the tableStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started