sec lists /singly linked list node with freelist support class link private element/value for this node private link next/point to next node in list /constructors link( itlink nextvalelement itnext nextvallink(link nextvalnext nextvallink next(return nextlink setnext(link nextvalreturn next nextvale element(return elemente setelement( itreturn element it/extensions to support freelists static link freelist null/freelist for the class /get new link static link get( itlink nextvalif (freelist =nullreturn new link(itnextval)/get from "newlink temp freelist/get from freelist freelist freelist next()temp setelement(it)temp setnext(nextval)return tempvoid release(element nullnext freelistfreelist this/class link /return link to freelist /drop reference to the element figure implementation for the link class with freelist the static declaration for member freelist means that all link class objects share the same freelist pointer variable instead of each object storing its own copy in the implementation shown herethe link class is augmented with methods get and release figure shows the reimplementation for the link class to support these methods note how simple they arebecause they need only remove and add an element to the front of the freelistrespectively the freelist methods get and release both run in th( timeexcept in the case where the freelist is exhausted and the new operation must be called