double value current ddataif(previous =null/beginning of list ourlist setfirst(current next)reset()else /not beginning previous next current nextifatend(reset()else current current nextreturn value///end class listiterator ///////////////////////////////////////////////////////////////class interiterapp public static void main(string[argsthrows ioexception linklist thelist new linklist()/new list listiterator iter thelist getiterator()/new iter double valueiter insertafter( )iter insertafter( )iter insertafter( )iter insertbefore( )")")/insert items while(truesystem out print("enter first letter of showresetsystem out print("nextgetbeforeafterdeletesystem out flush()int choice getchar()/get user' option switch(choicecase ' '/show list if!thelist isempty(thelist displaylist()