The implementation of the Generic SinglyLinkedList that was covered in class is missing some important operations. Complete the implementation by proving the code for the methods described below. The complete design of the class is shown below:
E removeLast() Remove the last element from the List and return it. If the List is empty, return null.
E get(int n) Return the nth element of the List. The first element is number 0. If n length(), return null.
void insertAfter(int n, E e) Insert the element e after the nth element of the List. If n length(), do not insert the element.
void delete(int n)Remove the nth element of the List. If n length(), do not delete an element.
When your implementation is complete, run it with the test driver EnhancedListTester.java(provided). Review the results to make sure that your modified class is working correctly.
EnhancedListTester:

SinglyLinkedList:

3 public class EnhancedList Tester El 11 12 13 14 public static void main(String[] args) { SinglyLinkedList 1 = new SinglyLinkedList(); System.out.println("Enhanced List Tester - Team Member 1, Team Member 2, Team Member 3, Team Member 4 ... "); System.out.println(1); 1.removeFirst(); 1. removeLast(); 1.delete(0); 1.addFirst("Alpha"); System.out.println(i); 1. addLast("Beta"); System.out.println(l); 1.addFirst("Gamma"); System.out.println(i); 1.addLast("Delta"); System.out.println(l); System.out.println("First is " + l.getFirst()); System.out.println("Last is ", + ?.getLast()); for (int i = 0; i { private static class Node private E element; private Node next; 6 public NodeE e, Node n) { element = e: next = n; 10 } 11 120 public E getElement() { 113 return element; 14 ) 15 16 public Node getNext() { 17 return next; 18 } 19 201 public void setNext (Node n) { 21 next = ni 22 } 23 } 24 25 private Node head; 26 private Node tail; 27 private int size; 28 29 296 public SinglyLinkedlist() { 30 head = null; 31 tail = null; 32 size = 0; 33 } 34 35 public int length() { 36 return size; 37 } 38 391 public boolean isEmpty() { 40 return size == ; 41 } 42 43 public E getFirst() { 44 if (isEmpty()) { 45 return null; 46 } 47 return head.getElement(); 48 } 49 500 public E getLast() { 51 if (isempty()) { 52 return null; 53 } 54 return tail.getElement(); 55 } 56 57 public void addFirst(E e) { 58 head = new Nodele, head); 59 if (isempty()) { 60 tail = head; 61 } 62 size++; 63 } 64 65 public void addLast(e) { 66 Node newest = new Nodele, null); 67 if (isEmpty()) { 68 head = newest; 69 } else { 78 tail.setNext(newest); 71 } 1 72 tail = newest; 73 size++; 74 } 75 760 public E removeFirst() { 77 if (isEmpty()) { 78 return null; 79 } 80 81 E answer = head.getElement(); 82 head = head.getNext(); 83 size-- 84 if (isEmpty()) { 85 tail = null; 86 } 87 return answer: 88 } 89 901 public String toString() { 91 String result = length() + ":["; 92 for (Node p = head; P != null; p = p.getNext()) { 93 result += p.getElement(); 94 if (p.getNext() != null) { 95 result +", "; 96 } 97 } 98 result = "]": 99 return result: 180 } 101 }