Fill This Form To Receive Instant Help
Homework answers / question archive / CIS355A Week 5 Lab—File Processing OBJECTIVES Add persistent data storage to your Week 4 Lab using text file input/output
CIS355A Week 5 Lab—File Processing
OBJECTIVES
PROBLEM: Stocks4U Portfolio Management System
The portfolio management system you developed for Stocks4U needs the ability to save and restore a user’s data from a text file.
FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI Builder Interface.
You will enhance Week 4 GUI to include
Stock class
“Company: qty shares” (i.e., “Apple: 10 shares”)
StockIO class
Create a StockIO class that is used to read from and write to a text file using an ArrayList. Make sure to use a delimiter between the fields; it does not have to be the # character. Example format of the file is:
Apple#100#55.0#80.0
Intel#50#75.0#70.0
This class should have two methods.
The file name will be an instance variable that you can set with a parameterized constructor, or with a separate method.
GUI class
Note that you will need to add an ArrayList to your GUI class to manage the data to/from the file. It will act as a parallel array to your DefaultListModel. Any time you add a stock, you must add it in BOTH places. Any time you remove a stock, you must remove it in BOTH places.
File—open should prompt for file name using JOptionPane, read the file and populate the JList.
File—save should prompt for file name to save data from JList to.
File—exit should exit the program.
The total value of the portfolio should be displayed at all times and updated anytime a stock is added or removed.
Sample GUI
RUBRIC
Stock class toString modified |
5 |
GUI class
|
15 |
StockIO class
|
20 |
Code style |
5 |
Lab Report |
10 |
TOTAL |
55 |
CODE STYLE REQUIREMENTS
/****************************************************
Program Name: ProgramName.java
Programmer's Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/
DELIVERABLES
Submit as a SINGLE zip folder
Follow assignment specification regarding class/method names.
Note that your Java file name must match class name (DO NOT rename).
CIS355A Lab Report
Your Name:
Date:
Lab Week ____
Objective/Purpose of the program
Briefly describe the program’s requirements.
Analysis/Design
Describe the approach/structure of program. What classes/functions were used?
Testing/Results
Does your program satisfy all requirements of the lab?
If yes, how did you test it? Indicate test cases used, expected values, and show results with screen shots. For example:
Case |
Description |
Test Data |
Expected Result |
Actual Result |
1 |
Describe what you are testing |
Specify the test data |
What is expected |
Actual results – reference an image that you include below. |
If any requirements are NOT met, document the known issues. What did you do to try to solve them?
Make sure you demonstrate in your testing the parts that are working correctly.
Conclusions / Lessons Learned
What difficult problems did you encounter, and how did you handle them?
What new concepts did you learn/reinforce with this lab?
Is there anything you would have done differently?
Please use this google drive link to download the answer file.
https://drive.google.com/file/d/1Qk42XFFqp_wLKl4O9vFPV4UV3P0_yFGK/view?usp=sharing
Note: If you have any trouble in viewing/downloading the answer from the given link, please use this below guide to understand the whole process.
https://helpinhomework.org/blog/how-to-obtain-answer-through-google-drive-link