Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago

Question

How would you assess the value of an approach like this?

Answered: 1 week ago

Question

When would you use one approach, and when would you use another?

Answered: 1 week ago