Question: CS510: Java Singly Link List I need some help with a single link list implementation in Java Programming. The program must implement the following cases:

CS510: Java Singly Link List

I need some help with a single link list implementation in Java Programming. The program must implement the following cases:

-Public void Adds(E object)

: adds object to the linked list, appending any other after when adding in main.

-Public void RemoveSpecific(int index)

: removes the first element chosen if it is in the linked list using the corresponding index value. Ex [1, 1, 2,] If user removes index 0, it will remove the first number 1 at position 0.

-Public void RemoveNormal:

-removes the first element from linked list regardless of position.

-Public boolean Contains(E object)

: returns the index of the first element chosen if its in the linked list

-Public int List()

: returns the linked list implemented from beginning to the end in correct order and returns the linked list in an array

-Public int index(E object)

: looks to see if the linked list implemented is empty or not

When running program in main see example below:

Public class SinglyLinkList

{

Public static void main (String[] x)

{

Elements z = new SinglyLinkList<>();

z.add(2);

z.add(7);

z.add(11);

. //etc

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!