Question: I need this is Dr Java. Help? Lab 02 To Do List Objective: Implement a system that keeps tracks of tasks you have to do!

I need this is Dr Java. Help?  I need this is Dr Java. Help? Lab 02 To Do
List Objective: Implement a system that keeps tracks of tasks you have

Lab 02 To Do List Objective: Implement a system that keeps tracks of tasks you have to do! Write a class ToDoList with the following Internal class ListNode which has o Instance Variables . data of type String link of type ListNode o Constructors . Default Parameterized Instance Variables o head: a ListNode which always points to the beginning of the linked list o current: a ListNode which moves to point at different items in the list o previous: a ListNode which points to the item behind current. . Constructor o A default constructor that initializes head to an empty ListNode and sets current and previous to point at the head. Methods o goToNext: This moves the current node forward in the list by one node. It doesn't move forward if that node is null o gotoPrev: This moves the current node backwards in the list by one node. It does not move backwards if the current node is the head. o getDataAtCurrent: returns the data at the current node as long as the current isn't null o setDataAtCurrent: takes in a parameter of type String and sets the data at the current node to that value as long as current is not null o addItem: This method adds a new node at the end of the list (HINT: Look for first null element using a loop). If the list is empty (thus head is null) then it starts the list. o insertAfterCurrent: creates a new node based on data that is passed in by a parameter and puts that node after the current position o deleteCurrentNode: removes the current node from the list by resetting the links o showList: prints out the contents of the list line-by-line Finally write a driver that implements an instance of GrocerList and demonstrates each of the methods work

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!