Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Define a class Emp with the following fields - emp_id, name, salary, gender, department, and emailid. Also, define the corresponding constructors, and getter and setter
Define a class Emp with the following fields - emp_id, name, salary, gender, department, and emailid. Also, define the corresponding constructors, and getter and setter methods. Further, override the toString0 method to display the details of the employee. Now create another class EmpList, that has an ArrayList as its data member. In this class, define two methods - addEmp(Emp ob), and deleteEmp(int eid) that adds and removes an Emp object in the list. Also, create methods to display minimum salary, maximum salary, average salary, and search an employee using the given emp_id. Finally, test the program using the main() method
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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