Question
Part I - Design class named Company that contains: JavaDoc comments on the entire class definition only A String attribute named name for the Company
Part I - Design class named Company that contains:
JavaDoc comments on the entire class definition only
A String attribute named name for the Company name
A double attribute named lastPrice that stores the stock price one month ago
A double attribute named currentPrice that stores the stock price for the current time
A default constructor
An overloaded constructor with all attributes
Accessors and mutators for each attribute
A copy Constructor
An equals Method
A toString() method to display current state of the object, formatted!
Create CompanyDriver application.
You will have at least 2 methods in this application, Create menu.
main() -
setCompanyData() - this reads the data from the file (call the file CompanyData.txt)
displayCompanyData() - this displays the data to the screen, calling the toString() method of all objects
//sortData() - This will sort the data by choice either name of stock or current price / This will be part of lab 7.
//Create arraylist of the 10 Company objects and display them. You may want to make this a method. This will be part of lab 7
Create array of the 10 Company objects and display them. You may want to make this a method.
Read the data from a file (see below)
Call each method as described above
CompanyData.txt (the data is set up like this: (Company name, lastprice, current price - copy and paste this into a .txt file)
GoPro, Inc. 10.71 13.69 Starbucks 59.53 58.46 JC Penney 7.73 10.78 Amazon 531.07 576.32 Adams Resources and Energy 34.96 33.77 Coca-Cola 42.72 43.60 McDonald's 121.47 115.99 Tesla Motors 173.48 187.90 Apple Inc 96.35 100.67 Facebook 112.69 108.93
Create Company ArgoUML file with the main class and the association with multiplicity.
Deliverables: Zip this up into one file with your name on the file
Company.java
CompanyDriver.java
CompanyData.txt
Company.zargo This may be drawn by hand an uploaded or any other software used.
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