Suppose you have a SimpleListADT interface that has the following
A LinkedSimpleList implementation of the SimpleListADT might start as follows:
- void addToEnd(Object element) -- adds the given object to the end of the
- void removeLast() -- removes the last element in the list; if the
list is empty, does nothing.
- void removeNth(int n) -- removes the nth element in the list, 0-based.
If n > length-1, does nothing.
public class LinkedSimpleList implements SimpleListADT
//... methods ...
Given this framework, write methods addToEnd, removeLast, and removeNth.