Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help, in java programming. Part 1 : Linked List Classes Introduction You are going to write a linked - list class. You will use
Please help, in java programming. Part : Linked List Classes Introduction You are going to write a linkedlist class. You will use this again in the future. So do a good job on it or you will hurt your future assignments. Your classes must be O for all adds and removes. So you must maintain a reference link to the tail. The following is the required interface for the class. This is not a deque, but it has many of the same features. It is a singly linked list. The following is the interface and required methods for your class.
Main class LinkedList Class
String About Returns text about you the author of this class.
void AddHeadString value Adds an object to the head of the list. This must be O
void AddTailString value Adds an object to the tail of the list. This must be O
String RemoveHead Removed an object from the head of the list. This must be O If the list is empty, return
Boolean IsEmpty Returns true if the linked list is empty. In other words, the head is null.
void PrintList Prints the linked list to standard out the screen This method simply calls PrintList on the Head if not null
Part : Node Class Overview You are going to create a very, very basic node class. Make sure to come up with a nice, welldocumented, and wellwritten solution. The Node class will contain the recursive method. In recursively defined structures all the coding and complexity is found in the recursive structure itself. The logic, for the recursion, must be located within this class. I know, I know, you can implement the logic within the Linked List Class. But, you are not allowed to
Interface Node Class
NodeString Constructor
Node Next The next node in the chain.
String Value The value that the node contains. Do not declare it of type "object".
void PrintList Prints the linked list to standard out the screen This method must be recursive.
Part : A number of test files will be provided to you for testing your code. The format is designed to be easy to read in multiple programming languages. You need to use the classes, built in your programming language, to read the source files. File Format The first line of the data contains the total digits in the key. You might want to save this value I can be used to separate the key from the value using the substring function found in most programming languages Different programming languages implement file IO in different ways. Some use classes and others use more primitive or ingrained features. This will take the form of either a While Loop or a Do Loop. In all cases, your main testing class will read the contents of the file and it to a instance of your linkedlist class. Do not make this a method in your LinkedList keep it in main
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started