Question: This needs to be done in Java here is the code: public class LList { private LLNode head; public LList() { head = null ;

This needs to be done in Java This needs to be done in Java here is the code: public

here is the code:

public class LList {

private LLNode head;

public LList() {

head = null;

}

public void addAtHead (String newData) {

LLNode newNode = new LLNode (newData);

newNode.updateNode(head);

head = newNode;

}

public void display() {

LLNode temp = head;

while (temp != null) {

System.out.println (temp);

temp = temp.getNext();

}

}

public LLNode deleteAtHead ( ) {

LLNode removedOne = head;

head = head.getNext();

return removedOne;

}

}

CST8130: Data Structures Lab #5-deleting in a linked list DUE: demonstrate in lab during week January 15-January 21 (or earlier) Start with my LList (Linked List) code example from class. Load it into a project in Eclipse In main, add a menu to handle: adding to head deleting from the head displaying a linked listed. e Then, add a menu selection for deleting a particular element in the list (so prompt the user for a string to delete and then find it in the linked list and delete that element from the list)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!