Question: Please I need your help:Using Java write a GUI program that maintains a cash balance, list of stock holdings, supports buying and selling of stocks

Please I need your help:Using Java

Please I need your help:Using Java write a GUI program that maintainsa cash balance, list of stock holdings, supports buying and selling ofstocks and displays the current portfolio inventory demonstrate the ability to assemblealready-written classes into a larger, more complicated program demonstrate the ability tosegregate business logic from user interface code. Capabilities At a minimum, theprogram should allow a user to buy a stock with a givennumber of shares and price per share. display the current portfolio (stockwrite a GUI program that maintains a cash balance, list of stock holdings, supports buying and selling of stocks and displays the current portfolio inventory demonstrate the ability to assemble already-written classes into a larger, more complicated program demonstrate the ability to segregate business logic from user interface code. Capabilities At a minimum, the program should allow a user to buy a stock with a given number of shares and price per share. display the current portfolio (stock ticker, number of shares, initial price). update the portfolio display for purchases and sales. allow the user to sell all of the shares of a given stock. give the user an initial cash balance, and update and display the balance according to the user's purchases and sales. ignore any transaction that causes the cash position to go below $0. Sample Execution The initial frame has text fields for the stock ticker, number of shares, and price per share. It has a label for the current cash balance. It also has buy and sell buttons. Stoc Shares per Share Cash: 1000.0 Sell Buy Let's buy Apple (ticker AAPL) shares. First we enter the ticker, number of shares and price per share. Then we click Buy. Note our cash was reduced accordingly. Our portfolio inventory now displays since it's no longer empty. Let's buy IBM. We enter the ticker, number of shares and price per share We click Buy. Our cash is reduced appropriately, our portfolio is updated. WidgetView moves things around. We won't worry about that. We also won't worry about the not-quite-right truncation of the last penny of the cash balance. Let's buy Microsoft (MSFT). We'll just skip to the completed transaction. We're losing faith in IBM's CEO; let's sell it. We need to tell our portfolio manager which stock we want to sell, and the selling price per share. Since we're selling all of our shares, we don't need to fill in that field. We click Sell, and the portfolio listing and cash are updated

Stoc Shares per Share Cash: 1000.0 Sell Buy

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!