{"id":23340,"date":"2018-02-20T23:50:30","date_gmt":"2018-02-20T23:50:30","guid":{"rendered":"https:\/\/writemyessayfree.com\/cis-355a-lab-4"},"modified":"2017-08-03T16:10:40","modified_gmt":"2017-08-03T16:10:40","slug":"cis-355a-lab-4","status":"publish","type":"post","link":"https:\/\/www.benedictsol.com\/blogs\/cis-355a-lab-4\/","title":{"rendered":"CIS 355A Lab 4"},"content":{"rendered":"<div class=\"the_content_wrapper\">\n<p><strong>OBJECTIVES<\/strong><\/p>\n<ul>\n<li>Create a GUI that uses JList and JTabbedPanes.<\/li>\n<li>Process multiple objects in an ArrayList.<\/li>\n<li>Code event handlers for multiple events.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>PROBLEM: Stocks4U Portfolio Management System<\/strong><\/p>\n<p>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.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>FUNCTIONAL REQUIREMENTS<\/strong><\/p>\n<p>You can code the GUI by hand or use NetBeans GUI builder interface.<\/p>\n<p>&nbsp;<\/p>\n<p>The GUI should have two tabs using JTabbedPane.<\/p>\n<ul>\n<li>One tab (\u201cShow stocks\u201d) should have<\/li>\n<\/ul>\n<p>o&nbsp;&nbsp; a JList to display all the stock purchases;<\/p>\n<p>o&nbsp;&nbsp; a text field or label to display information about a particular stock; and<\/p>\n<p>o&nbsp;&nbsp; a JButton to remove a stock.<\/p>\n<ul>\n<li>One tab (\u201cAdd stock\u201d) should have textboxes, labels, and a button to input a stock.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Create a Stock class to manage the stock activity. It should have private instance variables of<\/p>\n<ul>\n<li>company name;<\/li>\n<li>number of shares;<\/li>\n<li>purchase price; and<\/li>\n<li>current price.<\/li>\n<\/ul>\n<p>Create a default and parameterized constructor.<\/p>\n<p>Create sets\/gets for all instance variables.<\/p>\n<p>Create a get method to calculate and return the profit or loss. This would be calculated as<\/p>\n<p>Number of shares * (current price \u2013 purchase price).<\/p>\n<p>Create toString to display the name of the stock.<\/p>\n<p>&nbsp;<\/p>\n<p>As you add stocks, they are displayed in the JList.<\/p>\n<p>If you select an element in the JList, the gain or loss is displayed in the label or text field.<\/p>\n<p>&nbsp;<\/p>\n<p>If you select an element in the JList and click Remove, the stock is removed from the list.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>OBJECTIVES Create a GUI that uses JList and JTabbedPanes. Process multiple objects in an ArrayList. Code event handlers for multiple events. &nbsp; &nbsp; PROBLEM: Stocks4U Portfolio Management System Stocks4U needs to develop an app for you to manage your stock <a href=\"https:\/\/www.benedictsol.com\/blogs\/cis-355a-lab-4\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-23340","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/23340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/comments?post=23340"}],"version-history":[{"count":0,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/23340\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/media?parent=23340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/categories?post=23340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/tags?post=23340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}