Question: Object Oriented Programming- 14011102-4 Lab #7 Complete the following tasks in Java within the lab time using NetBeans Task 1: Create class Employee with the
Object Oriented Programming- 14011102-4 Lab #7 Complete the following tasks in Java within the lab time using NetBeans Task 1: Create class Employee with the Employee ID and name as private data members. You must add any needed methods and constructors Task 2: Create class Department with the Department ID, name as data members.in addition to a list of the Employee's who work at the Department as a ArrayList from class Employee. Again all these data members must be declared private and you should add any needed methods or constructors. Task 3: Create class Company with a main method in it. In the main method create an ArrayList of Employees. Fill it with at least 5 Employee objects. Then print the Department information (Name, id and the list of employees) sorted by their ids. Hint: In order to sort the s of employee use Collections.sort( ListName)
Step by Step Solution
There are 3 Steps involved in it
To complete the tasks youll need to create three Java classes Employee Department and Company Heres how you can structure these classes Task 1 Create ... View full answer
Get step-by-step solutions from verified subject matter experts
