Reference no: EM131230422
Lab-File Processing
OBJECTIVES
· Add persistent data storage to your Week 4 Lab using text file input/output.
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
· a File menu with menu items: open, save, exit; and
· a label to display total portfolio value.
Stock class
· Modify the toString of Stock class to display as
"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.
· getData-reads data from file, returns data in array list of stock objects
· saveData-writes data from an array list to the file in proper format
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.
What issues may the product encounter within the network
: List the ethical issues that the product, based on the pricing strategy, may need to hurdle within the marketplace, e.g., premium pricing strategy. What is the distribution model that the product will employ (wholesaler, distributor, or franchise) an..
|
Communication style differences
: You are a U.S. Business person, you are traveling to Japan to make an offer to buy an automobile facility in Tokyo. Pick 1 or more communication style differences and discuss what you would have to do differently facing a Japanese Business person.
|
About the notions of external and self-analysis
: In a conversation with some of your friends "who cannot wait to take Strategic Marketing, you were told that everyone in your class talks about the notions of "external" and "self-analysis." Identify and fully discuss the various facets of the firm's..
|
Edit and proofread given paragraph
: Edit and proofread given paragraph. - Specifically with grammar and sentence structure. - Consumers should understand and be able to translate the information presented to them concerning their health.
|
Create a stockio class that is used to write to a text file
: 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.
|
Project plan using a gantt chart
: HI6007 Assessment Three - brief literature review of the research topic and A project plan using a Gantt Chart and clearly defined milestones.
|
Provide a definition and a real-life example or scenario
: Provide a definition and a real-life example or scenario for each threat. In addition, explain how each threat/attack can be prevented or defended.
|
How do you go about making this decision
: The expansion could be open a new restaurant, add an addition to your medical office, merge with another business, purchase a competitor, or relocate to an area where the market fits your business service. It can be any other scenario that would b..
|
Write cpp program that will allow a user to manage inventory
: Write a C++ program that will allow a user to manage the inventory of a store. The inventory for a small electronics store for example will contain the information for each item in the inventory.
|