JAVA A. Implement a Linked List with the following methods: 1 Adding a node in t
ID: 3707751 • Letter: J
Question
JAVA A. Implement a Linked List with the following methods:
1 Adding a node in the beginning
2 Adding a node in the end of list
3 Deleting the first node
4 Deleting a node with a given data value
5 Searching the linked list for existence of given data
6 Deleting the last node
7 Displaying the contents of the list
8 Deleting all nodes with a data value
9 Instance variable data should save employee records (Employee Number, Employee name, Position, Salary) {Hint: Use and object of employee type}
Node class should include the methods for :
1 Getdata
2 Setdata
3 Get_nextnode
4 Set_nextnode
Implement a Doubly Linked List as follows (EXTRA CREDIT OF 100 POINTS):
The linked list should implement the following methods.
1 Adding a node in the beginning
2 Adding a node in the end of list
3 Deleting the first node
4 Deleting a node with a given data value
5 Searching the linked list for existence of given data
6 Deleting the last node
7 Displaying the contents of the list
8 Displaying the contents in the reverse order.
9 Deleting all nodes with a data value
Node class should contain the following data members:
1 data
2 Nextnode
3 Previousnode
It include the methods for :
1 Getdata
2 Setdata
3 Get_nextnode
4 Get_previousnode
5 Set_previousnode
6 Set_nextnode
firstNodeExplanation / Answer
Sample output
Doubly Linked List = Mark <-> Jack <-> Della <-> Jack <-> Jorge <-> Jack <-> Bill
Doubly Linked List in reverse order = Bill <-> Jack <-> Jorge <-> Jack <-> Della <-> Jack <-> Mark <->
deleteAtStart
Doubly Linked List = Jack <-> Della <-> Jack <-> Jorge <-> Jack <-> Bill
deleteAtEnd
Doubly Linked List = Jack <-> Della <-> Jack <-> Jorge <-> Jack
Search Della: true
Delete Jack Once
Doubly Linked List = Della <-> Jack <-> Jorge <-> Jack
Delete Jack All
Doubly Linked List = Della <-> Jorge
Process finished with exit code 0
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.