Question: 3.1 LINKEDLIST CLASS In this question, you will write a linked list class, and use it to store all of the words contained in a

 3.1 LINKEDLIST CLASS In this question, you will write a linked
list class, and use it to store all of the words contained

3.1 LINKEDLIST CLASS In this question, you will write a linked list class, and use it to store all of the words contained in a text file. You will write your linked list class in a file called LinkedList.java, which will contain BOTH the Linkedlist class and the Node class (only the LinkedList class is public) You have been provided with a main program file called A4Q1Test.java and a text file called darwin.txt First, create a Node class. It should contain, as usual, a pointer to another node, and a String reference Write a constructor that sets the data being stored in the Node, and set its link to the next Node to null. ite a constructor that sets the data be Write appropriate getters and setters as well. Next, create your LinkedList class. As usual, it should contain a first (top) pointer to the first node in the list. Additionally, create a last pointer to the last Node in the linked list (we'll see why later). Add an integer instance variable to keep track of the size (i.e. the number of words) in the linked list. Create the following public methods: . A null constructor that initializes the two Node pointers to null and the size to 0

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!