Question
USING JAVA, Thank you. 1. Define a class called EmployList containing one data field: a LinkedList of Employee. Create two constructor methods, one accessor(getter) method
USING JAVA, Thank you.
1. Define a class called EmployList containing one data field: a LinkedList of Employee. Create two constructor methods, one accessor(getter) method and one mutator(setter) method for the EmployList class.
2. Implement a pickMin method to pick the smallest ID from the EmployList.
3. Implement a pickSecondMin method to pick the second smallest ID from the EmployList. For example pickSecondMin from the list {[500,john] [450,ada][600,paul]} returns 500.
4. Implement a reverse( ) method to reverse the employee in the EmployList.
5. Implement a checkPathenthesis(String exp) method to check if a string has matching pairs of parenthesis. For example, checkPathenthesis(((() and checkPathenthesis())(() should return false and checkPathenthesis((())) returns true.
EDIT: From what I understood from the question, only ID and name should be in the LinkedList. I do not think it is necessary to make another class for Employee.
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