LinkedList-EX.java - To change this license header choose...

This preview shows page 1 - 2 out of 3 pages.

/** To change this license header, choose License Headers in Project Properties.* To change this template file, choose Tools | Templates* and open the template in the editor.*/import Stack.EmptyCollectionException;public class LinkedList<T> implements ListADT<T> {protected int count;protected LinearNode<T> head, tail;//protected int modCount;/*** create an empty list*/public LinkedList(){count = 0;head = tail = null;// modCount = 0;}/*** Removes and return the first element from this list;* @return the first element from this list;*/public T removeFirst()throws EmptyCollectionException{}/*** Removes and returns the last element from this list* @return the last element from this list*/public T removeLast()throws EmptyCollectionException{}/*** Add an element at the end of a list* @param element the element to be added at the beginning of the list*/public void addLast(T element){} /*** Add an element at the beginning of a list* @param element the element to be added at the beginning of the list*/public void addFirst(T element){}/**

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture