Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Linked Lists CS 151 -- Lab 10 Further Extending Linked Lists Write the following two methods within the linked list class discussed this week. Code is available at https://cs.brynmawr.edu/cs151/Data/lab10/SingleLinkedList.java.txt https://cs.brynmawr.edu/cs151/Data/lab10/LinkedListInterface.java.txt /** * 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 r); For addSorted, you should adjust the SingleLinkedList class to require that the data items are Comparable. Not required, but recommended, write a main function that uses that two functions you wrote and verifies that your functions actually work. What to turn in Send email to gtowell@brynmawr.edu with the two functions (or as much of the two functions are you complete in 80 minutes).