Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed 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 table

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MFDBS 91 3rd Symposium On Mathematical Fundamentals Of Database And Knowledge Base Systems Rostock Germany May 6 9 1991

Authors: Bernhard Thalheim ,Janos Demetrovics ,Hans-Detlef Gerhardt

1991st Edition

3540540091, 978-3540540090

More Books

Students also viewed these Databases questions