set( , ( , , addafter(first(), ( , , , the node list adtwith its built-in notion of positionis useful in number of settings for examplea program that simulates game of cards could model each person' hand as node list since most people keep cards of the same suit togetherinserting and removing cards from person' hand could be implemented using the methods of the node list adtwith the positions being determined by natural ordering of the suits likewisea simple text editor embeds the notion of positional insertion and removalsince such editors typically perform all updates relative to cursorwhich represents the current position in the list of characters of text being edited java interface representing the position adt is given in code fragment code fragment adt java interface for the position an interface for the node list adtcalled position listis given in code fragment this interface uses the following exceptions to indicate error conditions boundaryviolationexceptionthrown if an attempt is made at accessing an element whose position is outside the range of positions of the list (for examplecalling method next on the last position of the sequenceinvalid position exceptionthrown if position provided as argument is not valid (for exampleit is null reference or it has no associated list