- 1、本文档共21页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Chapter 1 Overview
These questions are intended as a self-test for readers. Answers to the questions may
be found inAppendix C.
1. In many data structures you can________ a single record, _________ it, and
_______ it.
2. Rearranging the contents of a data structure into a certain order is called
_________ .
3. In a database, a field is
a. a specific data item.
b. a specific object.
c. part of a record.
d. part of an algorithm.
4.The field used when searching for a particular record is the ______________ .
5. In object-oriented programming, an object
a. is a class.
b. may contain data and methods.
c. is a program.
d. may contain classes.
6.A class
a. is a blueprint for many objects.
b. represents a specific real-world object.
c. will hold specific values in its fields.
d. specifies the type of a method.
7. InJava, a class specification
a. creates objects.
b. requires the keyword new.
c. creates references.
d. none of the above.
8. When an object wants to do something, it uses a ________ .
9. InJava, accessing an object’s methods requires the _____ operator.
10. InJava, boolean and byte are_____________ .
(There are no experiments or programming projects for Chapter 1.)
Questions 31
Chapter 1, Overview
Answers to Questions
1. insert, searchfor, delete
2. sorting
3. c
4. search key
5. b
6. a
7. d
8. method
9. dot
10. data types
Chapter 2 Arrays
These questions are intended as a self-test for readers. Answers may be found in
Appendix C.
1. Inserting an item into an unordered array
a.takes time proportionalto the size of the array.
b. requires multiple comparisons.
c. requires shifting other items to make room.
d.takes the same time no matter how many items there are.
2.True or False:Whenyou delete an item from an unordered array, in most cases
you shift other items to fill in the gap.
3. In an unordered array, allowing duplicates
a. increases times for all operations.
b. increases searchtimes in some situations.
文档评论(0)