Question: written in java 2 (15 points) Consider the linked list class we wrote in class. Suppose we declared the Node class to contain a name
2 (15 points) Consider the linked list class we wrote in class. Suppose we declared the Node class to contain a name (String) and a reference to the next Node (as in private Node next). Assume all required setters and getters. Also assume the first element in the linked list is referenced by a variable called "front". a) Write a method to find the reference to a Node containing a specific name (key) as in public Node find (String key) b) Write a method to delete the first element in the linked list, return a reference to the deleted node, and update the corresponding list. The method would be: public Node deleteFront ()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
