Avila University Python Programming Project

P ROBLEMUsing the given generic interface LinkedList.java and the generic class Node.java, create a class MyLinkedList.java which is a
generic class which implements LinkedList.java. It should contain the following attributes:

Node head – the first value of the linked list
As well as the following constructors/methods:


add(E item): void – Adds a new Node containing the item E to the end of the linked list.
add(E item, int loc): void – Adds a new Node containing the item E at the location loc, shifting the item already there
forward if necessary.

remove(E item): void – removes the first node containing a value equal to item, adjusting the order the linked list
traverses if necessary.




clear(): void – Empties the linked list entirely.
getSize(): int – returns the size of the list by traversing through the linked list.
getValue(int loc): E – returns the value of the node located at index loc.
indexOf(E item): int – returns the index of the first node that contains the value item.
rev. February 16 – 1 / 1

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER