Reference no: EM131594511
Java
Processing Arrays of Objects
OBJECTIVES
- Create a GUI that uses JList and JTabbedPanes.
- Process multiple objects in an ArrayList.
- Code event handlers for multiple events.
PROBLEM: Stocks4U Portfolio Management System
Stocks4U needs to develop an app for you to manage your stock purchases. You should be able to store a list of stock purchases, view the individual stocks, add and remove stocks.
FUNCTIONAL REQUIREMENTS
You can code the GUI by hand or use NetBeans GUI builder interface.
The GUI should have two tabs using JTabbedPane.
- One tab ("Show stocks") should have
- a JList to display all the stock purchases;
- a text field or label to display information about a particular stock; and
- a JButton to remove a stock.
- One tab ("Add stock") should have textboxes, labels, and a button to input a stock.
Create a Stock class to manage the stock activity. It should have private instance variables of
- company name;
- number of shares;
- purchase price; and
- current price.
Create a default and parameterized constructor.
Create sets/gets for all instance variables.
Create a get method to calculate and return the profit or loss. This would be calculated as
Number of shares * (current price - purchase price).
Create toString to display the name of the stock.
As you add stocks, they are displayed in the JList.
If you select an element in the JList, the gain or loss is displayed in the label or text field.
If you select an element in the JList and click Remove, the stock is removed from the list.
Develop a change model to implement your change vision
: Develop a change model to implement your change vision. Identify the specific steps needed to implement a change and effectively respond to the pressure.
|
The presentation of ptsd for active duty military
: An explanation of how the presentation of PTSD for active duty military might be complicated by military experience.
|
Measuring storage efficiency in an organization
: Evaluate the importance of measuring storage efficiency in an organization's storage system. Suggest the main approaches for measuring storage efficiently.
|
Type of facility that will be constructed
: Identification of possible programs that will be implemented in the facility, Type of facility that will be constructed
|
Create a gui that uses jlist and jtabbedpanes
: Create a GUI that uses JList and JTabbedPanes. Process multiple objects in an ArrayList. Code event handlers for multiple events.
|
Explain what were features and benefits of specific product
: What were the features, advantages, and benefits of specific product or brand that you selected? After completing the 3 tables, consider positioning of brand.
|
Ideal voltage source has infinite internal resistance
: State, with reasons, whether the following statements are True or False. Ideal voltage source has infinite internal resistance.
|
Prepare the journal entry to record the proceeds of the note
: Sheridan Company borrows $61,200 on July 1 from the bank by signing a $61,200, 6%, Prepare the journal entry to record the proceeds of the note
|
The effects of bereavement may complicate client diagnosis
: The effects of bereavement may complicate client diagnosis, especially for clients that you may already be treating for other disorders.
|