Question
CSC151 Stock Portfolio GUI Project Goal You are to write a GUI program that will allow a user to buy, sell and view stocks in
CSC151 Stock Portfolio GUI Project Goal You are to write a GUI program that will allow a user to buy, sell and view stocks in a stock portfolio. This document will describe the minimum expected functions for a grade of 90. Your mission is to go and do better. Youll find a list of enhancement options at the end of this document. Objectives By the end of this project, the student will be able to write 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 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. Note, the focus of this project is functionality. WidgetView provides limited ability to pretty up the interface, so well just live with that limitation. Figure 1 Initial Frame Let's buy Apple (ticker AAPL) shares. First, we enter the ticker, number of shares and price per share. Figure 2 Data for Apple Purchase Then we click Buy. Note our cash was reduced accordingly. Our portfolio inventory now displays since it's no longer empty. Figure 3 Click Buy to Purchase Apple Let's buy IBM. We enter the ticker, number of shares and price per share. Figure 4 Data to Purchase IBM 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. Figure 5 Click Buy to Purchase IBM Let's buy Microsoft (MSFT). We'll just skip to the completed transaction. Figure 6 Purchase of Microsoft 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. Figure 7 Data to Sell IBM We click Sell, and the portfolio listing and cash are updated. Figure 8 IBM is Sold Hints The StockHolding and PortfolioList classes from earlier Lessons should be directly usable in this project. The sample screens above were generated with a version of that code that had slightly different toString() methods, but that's not significant to the function of the program. Enhancements The following is a list of possible enhancements, along with their point value, from which you can choose. 1. track the profit or loss on the trades 4 points 2. allow for sale of partial holding 4 points 3. subsequent purchases to be added to an existing holding 4 points 4. formatting of dollar values 1 point 5. user entered numeric data error checking/reporting 2 points 6. checking/reporting of data entry errors (e.g., cant spend more than your balance on hand, cant sell a stock you dont own, cant sell more shares than you own) 3 points As you can see, it is possible to earn more than 100 points on this assignment. Submission of your project Refer to Blackboards Announcement page for the due date Utilize the same submission guidelines that have been used for labs Screenshots should utilize the test data that appear in this document In the screenshot Word document, identify/describe each enhancement that you made to the program. Identify each enhancement that you implement (use the enhancement number from above) and provide one or more screenshots which illustrate the enhancement. The actual number of points that youll earn will be based on the information that you supply and my subjective assessment of its quality. So, in a nutshell, impress me.
Step 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