Question: https://paste.ofcode.org/tH6k4AjEczuMApJXbFeqZC(LList Class) https://paste.ofcode.org/34vLn3vdCMUmvfMaCfxhGMv(LList test class) https://paste.ofcode.org/YLbaWnjJwyYDbS9dK3KXUs(Node Class) Please follow the instruction and test the class on blue J * In this assignment you will implement
https://paste.ofcode.org/tH6k4AjEczuMApJXbFeqZC(LList Class)
https://paste.ofcode.org/34vLn3vdCMUmvfMaCfxhGMv(LList test class)
https://paste.ofcode.org/YLbaWnjJwyYDbS9dK3KXUs(Node Class)
Please follow the instruction and test the class on blue J
* In this assignment you will implement a few of the methods for a linked list. Your project should include tests on the LList class to demonstrate that everything is working.
You can start with the Node and LList classes thats been designed ( In the link above)
Implement the following methods:
public void addFirst(Object value) Create a new node, put the value in it, and add it to the head of the list. We did this in class.
public int size() Return the number of nodes in the list. We did this in class.
public int get(int index) Return the value found at the given index, counting from 0.
public void set(int index, Object v) Replace the value found at the given index with v.
public String toString() Return a string with all the values, each separated by a comma and a space, all surrounded by brackets. The format should be identical to the way Alf worked. Return just a set of brackets "[]" if the list is empty.
public void clear() Clear out the entire list.
public int indexOf(Object target) Search for the target string. If found, return its index. If not, return -1.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
