Question: In java This assignment will also help you to become familiar with the following important content knowledge in this discipline: - array - linked list

In java
This assignment will also help you to become familiar with the following important content knowledge in this discipline:
- array
- linked list
- stacks
- queues
- priority queues
Tasks
```
public class Node{
E element;
Node next;
Node previous;
public Node(E e){
element = e;
}
}
```
Implement the following methods in MyDoublyLinkedList.
1. public MyLinkedList()
2. public MyLinkedList(E[] objects)
3. public E getFirst()
4. public E getLast()
5. public void addFirst(E e)
6. public void addLast(E e)
7. public void add(int index, E e)
8. public E removeFirst()
9. public E removeLast()
10. public E remove(int index)
11. public String toString()
12. public void clear()
13. public boolean contains(Object e)
14. public E get(int index)
15. public int indexOf(Object e)
16. public int lastIndexOf(E e)
17. public E set(int index, E e)
18. public int size()
Submission Format
- source code and sample run
In java This assignment will also help you to

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 Programming Questions!