Chapter 4 Unordered List.ppt

Chapter 4 Unordered List

Chapter 4 Unordered List Learning Objectives Describe the properties of an unordered list.(描述无序表的特性) Study sequential search and analyze its worst-case and average running times.(学习顺序查找,分析最坏和平均性能) Discover how the entries of a list may be dynamically rearranged at achieve better search times.(揭示如何排列数据可提高查找性能) Understand the public interface of an unordered list class in Java and the running times of its methods.(了解java中无序表的接口和方法的运行时间) Learning Objectives Develop a set of classes for an expense processing application based on an unordered list.(为一个日常支出管理系统设计一系列基于无序表的类) Understand how object-oriented programming can be used to write a single piece of code in Java that can perform equality checking based on different criteria for different input objects.(理解面向对象编程如何编写java程序,根据不同的原则进行对象的相等比较) Learn what linked lists are, why they are useful, and how to build and manipulate them.(链式表的作用,创建和处理方法) Learning Objectives Implement a linked list class in Java and analyze the running times of its methods. Implement an unordered list class in Java using a linked list component. 4.1 Unordered List Properties Keeping track of daily expenses. It would be useful to write a program that maintains an expense list of all recorded expenses, that can be used to find quick answers to simple budgeting type questions. 4.1 Unordered List Properties 4.1 Unordered List Properties 4.1 Unordered List Properties Answer the following questions: What is the maximum (or minimum) expense, and on what item? What is the average expense? What is the total amount spent on a given item? What is the itemwise breakup of expenditure? What is the total amount spent in a given time period? All these question may be answered by scanning such a list from the beginning and terminating when our question is answered. 4.1 Unordered List Properties 4.2 Sequential Search Operation contains searches for a specific item in the list. Since the list is unordered, the only way to conduct the search is to look at every elemen

文档评论(0)

1亿VIP精品文档

相关文档