Question: using java language In this assignment you will implement a few of the methods for a linked list. Your project should include tests on the

using java language using java language In this assignment you will implement a few of

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 we designed in lecture. Implement the following methods: public void addFirst(int value) Create a new node, put the value in it, and add it to the head of the list. public int size() Return the number of nodes in the list. public int get(int index) Return the value found at the given index, counting from 0. public void removeFirst Remove the head node. The second node becomes the head. public String toString() Return a string with all the values, each separated by a comma and a space. public void insert(int index, int value) Insert a new node into the list. Write tests to ensure this is working. public void addLast(int value) Add a new node after the last node (end of the list)

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!