Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions