Code is available on goldengate at
/home/gtowell/Public/151/LabNov16/SingleLinkedList.java /home/gtowell/Public/151/LabNov16/LinkedListInterface.java
/** * Determine if the list contains the provided object. * @param r the object to be looked for. * @return true iff the object is in the linked list. */ boolean contains(J r); /** * Given a linked list whose items are in sorted order, * add the new item, r, so that the items in the linked list are * still in sorted order after the addition. * @param: r the item to be added * @return true iff the addition succeeded (it will always succeed). **/ boolean addSorted(Comparable<J> r);For addSorted, you should adjust the SingleLinkedList class to require that the data items are Comparable.