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

  1. What is the difference between importing a package and a single class?
  2. What is the difference between fixed size arrays and arraylists?
  3. 1. Create a 4 new classes: Company, Employee, Manager, Intern
  4. In the Intern class, add the following field variables
  5. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!