解决方案 »

  1.   

     请选择贴子标题颜色: 默认 红色 黄色 蓝色 绿色 紫色 自定颜色 (请输入颜色代码:#ffcc00)QuestionIn this question, you are required to implement a variation of the linked list ADT called acircular linked list. The linked list should be able to be used to keep any Object typedata. The linked field of the last node of a circular linked list is not NULL, instead itpoints back to the first node. Your implementation should at least include the followingoperations: Add to the end of the list
     Remove a specified item from the list
     Retrieve a specified item from the list
     Traverse the list using an IteratorYou may include other operations deemed necessary.Using the Linked List ADT that you have implemented above, write an application code to testyour ADT. Choose an object (such as Book, Worker, Retail Item, etc), define the class forthe object, and create a list to work on these objects. Allow your application code todemonstrate the use of all the operations defined in the Linked List ADT.
    in this Question, there has includes: Node class; LinkedList class; Object class;Application code;or there has Linkedlist ADT class; Object class; Application code;中文大意:
    在这个题目,要求你去实现一个链表ADT的称为循环链表的变化。链表应该能够被用来保留任何对象类型的数据。在一个循环链表的最后一个节点相连字段不为空,而是指回第一个节点。你的执行应当至少包括以下操作:
      添加到列表的末尾
    删除指定项从列表
    检索一个指定的项目从列表
    遍历列表使用的Iterator您可能包括其他必要行动。
    使用链表ADT的,你已实施以上,编写应用程序代码来测试您的ADT的。选择一个对象(如图书,工人,零售项目等),定义为对象类,并创建一个列表,这些对象工作。允许您的应用程序代码来演示的所有链表的ADT的定义的操作使用。
    在这个问题上,有包括:节点类; LinkedList类,对象类,应用程序代码;
    或有LinkedList的ADT的类;对象类,应用程序代码. 可以用GUI界面跟 还是用到JOptionPane.