Question: What is the difference between importing a package and a single class? What is the difference between fixed size arrays and arraylists? 1. Create a
- What is the difference between importing a package and a single class?
- What is the difference between fixed size arrays and arraylists?
- 1. Create a 4 new classes: Company, Employee, Manager, Intern
- In the Intern class, add the following field variables
-
Note: Data type and name will be part of the points here.
A. A variable to store their full name
B. A variable to store their employee number (mix of letters and numbers)
C. A variable to store their salary
D. A variable to store their Manager.
3. In the Manager class, add the following field variables
Note: Data type and name will be part of the points here.
A. A variable to store their full name
B. A variable to store their employee number (mix of letters and numbers)
C. A variable to store their salary
D. A variable to store a list of Interns.
4. In the Employee class, add the following field variables
Note: Data type and name will be part of the points here.
A. A variable to store their full name
B. A variable to store their employee number (mix of letters and numbers)
C. A variable to store their salary
5. In the Company class, add the following field variables
Note: Data type and name will be part of the points here.
A. A variable to store the company name
B. A variable to store a list of Employees
C. A variable to store a list of Managers
D. A variable to store a list of Interns.
6. Add constructors to all of the classes. They will pass in all non-list data. The list data will just be defaulted to a new list.
7. Add the getter and setter methods for all non-list field variables in all four classes.
8. Add add and remove methods for the list field variables in the two classes with Lists.
9. Add the toString method for each class. The list field variables will require a loop to properly print out the information.
10. In the Company class, create a main method.
11. In the main method, create at least 5 total Employees, Managers and Interns (at least 1 of each type).
12. In the main method, create a Company object
13. Add the objects to their appropriate Lists
14. Output all of the data created to verify toStrings worked.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
