realization with node-list methods size()isempty(size()isempty(getfirst(first()*element(getlast(last()*element(addfirst(eaddfirst(eaddlast(eaddlast(eremovefirst(remove(first()removelast(remove(last()doubly linked list implementation suppose we would like to implement the node list adt using doubly linked list (section we can simply make the nodes of the linked list implement the position adt that iswe have each node implement the position interface and therefore define methodelement()which returns the element stored at the node thusthe nodes themselves act as positions they are viewed internally by the linked list as nodesbut from the outsidethey are viewed only as positions in the internal viewwe can give each node instance variables prev and next that respectively refer to the predecessor and successor nodes of (which could in fact be header or trailer sentinel nodes marking the beginning and end of the listinstead of using variables prev and next directlywe define methods getprevsetprevgetnextand setnext of node to access and modify these variables