出版時(shí)間:2012-6 出版社:科學(xué)出版社 作者:(美)梅因,(美)薩維特奇 著 頁數(shù):818 字?jǐn)?shù):1160000
Tag標(biāo)簽:無
內(nèi)容概要
數(shù)據(jù)結(jié)構(gòu)——C++版(第四版)(英文影印版)是一本基于C++的思想、介紹數(shù)據(jù)結(jié)構(gòu)和算法的大學(xué)教材,已經(jīng)在全球多個(gè)國家的大學(xué)用作數(shù)據(jù)結(jié)構(gòu)課程的基礎(chǔ)教材。數(shù)據(jù)結(jié)構(gòu)——C++版(第四版)(英文影印版)以C++語言作為實(shí)現(xiàn)語言,利用面向?qū)ο蟮姆椒?,從?guī)格說明出發(fā),使用基礎(chǔ)的數(shù)據(jù)類型來描述程序算法的設(shè)計(jì)與實(shí)現(xiàn)。書中主要內(nèi)容包括:軟件開發(fā)的各個(gè)階段,抽象數(shù)據(jù)類型與C++類,容器類,指針與動(dòng)態(tài)數(shù)組,鏈表,用模板、迭代器和STL進(jìn)行軟件開發(fā),堆棧,隊(duì)列,遞歸思想,樹,平衡樹,查找,排序,派生類與繼承,圖表。通過學(xué)習(xí)數(shù)據(jù)結(jié)構(gòu)——C++版(第四版)(英文影印版),可使讀者具備使用數(shù)據(jù)類型的能力,學(xué)會(huì)利用多種方法來實(shí)現(xiàn)數(shù)據(jù)類型,以及從不同的實(shí)現(xiàn)中進(jìn)行取舍。
數(shù)據(jù)結(jié)構(gòu)——C++版(第四版)(英文影印版)可作為計(jì)算機(jī)、電類專業(yè)本科生和非信息技術(shù)專業(yè)碩士研究生的教材,也可供工程技術(shù)人員參考。
作者簡介
作者:(美國)梅因(Michael Main) (美國)薩維特奇(Walter Savitch)
書籍目錄
CHAPTER 1 THE PHASES OF SOFTWARE DEVELOPMENT
CHAPTER 2 ABSTRACT DATA TYPES AND C++ CLASSES
CHAPTER 3 CONTAINER CLASSES
CHAPTER 4 POINTERS AND DYNAMIC ARRAYS
CHAPTER 5 LINKED LISTS
CHAPTER 6 SOFTWARE DEVELOPMENT WITH TEMPLATES, ITERATORS, AND THE
STL
CHAPTER 7 STACKS
CHAPTER 8 QUEUES
CHAPTER 9 RECURSIVE THINKING
CHAPTER 10 TREES
CHAPTER 11 BALANCED TREES
CHAPTER 12 SEARCHING
CHAPTER 13 SORTING
CHAPTER 14 DERIVED CLASSES AND INHERITANCE
CHAPTER 15 GRAPHS
APPENDIXES
INDEX
章節(jié)摘錄
版權(quán)頁: 插圖: 1 Specify, design, and implement a class that can be used in a program that simulates a combination lock. The lock has a circular knob, with the numbers o through 39 marked on the edge, and it has a three-number combination, which we'll callx, y, z. To open the lock, you must turn the knob clockwise at least one entire revolution, stopping with x at the top; then turn the knob counter-clockwise, stopping the second time that y appears at the top; finally turn the knob clockwise again, stopping the next time that z appears at the top. At this point, you may open the lock. Your lock class should have a constructor that initializes the three-number combination (use 0, 0, 0 for default arguments). Also provide member functions: (a)to alter the lock's combination to a new three-number combination (b) to turn the knob in a given direction until a specified number appears at the top (c) to close the lock (d) to attempt to open the lock (e)to inquire about the status ofthe lock (open or shut) (f)to tell you what number is currently at the top 2 Specify, design, and implement a class called statistician. After a statistician is initialized, it can be 2iven a seauence of double numbers. Each number in the sequence is given to the statistician by activating a member function called next_numbe r. For example, we can declare a statistician called s, and then give it the sequence of numbers1.1, -2.4, 0.8 as shown here: statistician s; s.next_number(1.1); s.next_number(-2.4); s.next_number(0.8); After a sequence has been given to a statistician,there are various member functions to obtain information about the sequence. Include member functions that will provide the length of the sequence, the last number ofthe sequence, the sum of all the numbers in the sequence, the arithmetic mean of the numbers (i.e., the sum of the numbers divided by the length of the sequence), the smallest number in the sequence, and the largest number in the sequence. Notice that the length and sum functions can be called at any time, even ifthere are no numbers in the sequence. In this case of an "empty" sequence,both length and sum will be zero. But the other member functions all have a precondition requiring that the sequence is non-empty.
編輯推薦
《數(shù)據(jù)結(jié)構(gòu):C++版(第4版)(英文影印版)》以C++語言作為實(shí)現(xiàn)語言,利用面向?qū)ο蟮姆椒?,從?guī)格說明出發(fā),使用基礎(chǔ)的數(shù)據(jù)類型來描述程序算法的設(shè)計(jì)與實(shí)現(xiàn)?!稊?shù)據(jù)結(jié)構(gòu):C++版(第4版)(英文影印版)》可作為計(jì)算機(jī)、電類專業(yè)本科生和非信息技術(shù)專業(yè)碩士研究生的教材,也可供工程技術(shù)人員參考。
圖書封面
圖書標(biāo)簽Tags
無
評(píng)論、評(píng)分、閱讀與下載
數(shù)據(jù)結(jié)構(gòu) PDF格式下載