图书介绍
PROGRAMMING IN C++ THIRD EDITIONPDF|Epub|txt|kindle电子书版本网盘下载
- NELL DALE,CHIP WEEMS 著
- 出版社: HIGHER EDUCATION PRESS
- ISBN:7040191091
- 出版时间:2006
- 标注页数:720页
- 文件大小:114MB
- 文件页数:40539826页
- 主题词:C语言-程序设计-英文
PDF下载
下载说明
PROGRAMMING IN C++ THIRD EDITIONPDF格式电子书版下载
下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!
(文件页数 要大于 标注页数,上中下等多册电子书除外)
注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具
图书目录
1Overview of Programming and Problem Solving1
1.1 Overview of Programming2
How Do We Write a Program?2
1.2 What is a Programming Language?6
1.3 What is a Computer?11
1.4 Problem-Solving Techniques14
Ask Questions15
Look For Things That Are Familiar15
Solve by Analogy15
Means-Ends Analysis16
Divide and Conquer17
The Building-Block Approach18
Merging Solutions18
Mental Blocks: The Fear of Starting19
Algorithmic Problem Solving19
Summary20
Quick Check21
Exam Preparation Exercises21
Programming Warm-Up Exercises23
2C++ Syntax and Semantics, and the Program Development Process25
2.1 The Elements of C++ Programs26
Syntax and Semantics28
Syntax Templates30
Naming Program Elements: Identiers32
Data and Data Types33
Data Storage34
The char Data Type34
The string Data Type34
Naming Elements: Declarations35
Taking Action: Executable Statements40
Beyond Minimalism: Adding Comments to a Program44
2.2 Program Construction45
Blocks (Compound Statements)47
The C++ Preprocessor49
An Introduction to Namespaces50
2.3 More About Output52
Creating Blank Lines52
Inserting Blanks Within a Line53
Programming Example54
Testing and Debugging59
Summary60
Quick Check60
Exam Preparation Exercises62
Programming Warm-Up Exercises64
Programming Problems66
Programming Example Follow-Up67
3Numeric Types, Expressions, and Output70
Integral Types70
Floating-Point Types71
3.2 Declarations for Numeric Types71
Named Constant Declarations72
Variable Declarations73
3.3 Simple Arithmetic Expressions73
Arithmetic Operators73
Increment and Decrement Operators76
3.4 Compound Arithmetic Expressions77
Precedence Rules77
Type Coercion and Type Casting79
3.5 Function Calls and Library Functions82
Value-Returning Functions82
Library Functions84
Void Functions85
3.6 Formatting the Output86
3.7 Additional string Operations92
The length and size Functions92
The find Function94
The substr Function95
Programming Example97
Testing and Debugging100
Summary100
Quick Check101
Exam Preparation Exercises102
Programming Warm-Up Exercises104
Programming Problems105
Programming Example Follow-Up107
4Program Input and the Software Design Process109
4.1 Getting Data into Programs110
Input Streams and the Extraction Operator (>>)110
The Reading Marker and the Newline Character113
Reading Character Data with the get Function114
Skipping Characters with the ignore Function116
Reading String Data117
4.2 Interactive Input/Output118
4.3 Noninteractive Input/Output120
4.4 File Input and Output121
Files121
Using Files122
An Example Program Using Files125
Run-Time Input of File Names127
4.5 Input Failure128
4.6 Software Design Methodologies130
4.7 What Are Objects131
4.8 Object-Oriented Design132
4.9 Functional Decomposition133
Modules135
Programming Example137
Testing and Debugging141
Testing and Debugging Hints142
Summary143
Quick Check144
Exam Preparation Exercises144
Programming Warm-Up Exercises147
Programming Problems149
Programming Example Follow-Up151
5Conditions, Logical Expressions, and Selection Control Structures153
5.1 Flow of Control154
Selection155
5.2 Conditions and Logical Expressions155
The bool Data Type156
Logical Expressions156
Precedence of Operators163
Relational Operators with Floating-Point Types164
5.3 The If Statement165
The If-Then-Else Statement165
Blocks (Compound Statements)168
The If-Then Statement169
A Common Mistake170
5.4 Nested If Statements171
The Dangling else174
5.5 Testing the State of an I/O System175
Programming Example177
Testing and Debugging182
Testing in the Problem-Solving Phase: The Algorithm Walk-Through182
Testing in the Implementation Phase185
Tests Performed Automatically During Compilation and Execution189
Testing and Debugging Hints189
Summary191
Quick Check191
Exam Preparation Exercises192
Programming Warm-Up Exercises194
Programming Problems196
Programming Example Follow-Up199
6Looping201
6.1 The While Statement202
6.2 Phases of Loop Execution203
6.3 Loops Using the While Statement204
Count-Controlled Loops204
Event-Controlled Loops205
Looping Subtasks209
6.4 How to Design Loops211
Designing the Flow of Control212
Designing the Process Within the loop213
The Loop Exit213
6.5 Nested Logic214
Designing Nested Loops215
Programming Example216
Testing and Debugging224
Loop-Testing Strategy224
Testing and Debugging Hints225
Summary226
Quick Check227
Exam Preparation Exercises228
Programming Warm-Up Exercises231
Programming Problems233
Programming Example Follow Up236
7Functions237
7.1 Functional Decomposition with Void Functions238
Writing Modules as Void Functions238
7.2 An Overview of User-Defined Functions241
Flow of Control in Function Calls242
Function Parameters242
7.3 Syntax and Semantics of Void Functions244
Function Call (Invocation)244
Function Declarations and Definitions244
Local Variables246
The Return Statement247
Header Files248
7.4 Parameters249
Value Parameters249
Reference Parameters251
Matching Arguments with Parameters251
7.5 Designing Functions254
Writing Assertions as Program Comments256
Documenting the Direction of Data Flow257
Programming Example260
Testing and Debugging264
The assert Library Function265
Testing and Debugging Hints267
Summary268
Quick Check268
Exam Preparation Exercises269
Programming Warm-Up Exercises271
Programming Problems273
Programming Example Follow-Up277
8Scope, Lifetime, and More on Functions279
8.1 Scope of Identifiers280
Scope Rules282
Variable Declarations and Definitions285
Namespaces286
8.2 Lifetime of a Variable289
Initializations in Declarations290
8.3 Interface Design291
Side Effects291
Global Constants293
8.4 Value-Returning Functions293
Boolean Functions296
Interface Design and Side Effects298
When to Use Value-Returning Functions298
Programming Example300
Testing and Debugging307
Stubs and Drivers308
Testing and Debugging Hints308
Summary309
Quick Check310
Exam Preparation Exercises311
Programming Warm-Up Exercises313
Programming Problems315
Programming Example Follow-Up318
9Additional Control Structures319
9.1 The Switch Statement320
9.2 The Do-While Statement324
9.3 The For Statement325
9.4 The Break and Continue Statements329
9.5 Guidelines for Choosing a Looping Statement332
Programming Example333
Testing and Debugging338
Testing and Debugging Hints338
Summary339
Quick Check339
Exam Preparation Exercises340
Programming Warm-Up Exercises342
Programming Problems343
Programming Example Follow-Up346
10Simple Data Types: Built-In and User-Defined347
10.1 Built-In Simple Types348
Integral Types350
Floating-Point Types351
10.2 Additional C++ Operators352
Assignment Operators and Assignment Expressions354
Increment and Decrement Operators354
Bitwise Operators355
The Cast Operation356
The sizeof Operator356
The ?: Operator357
Operator Precedence357
10.3 Working With Character Data359
Character Sets359
C++ char Constants360
Programming Techniques361
10.4 More on Floating-Point Numbers367
Representation of Floating-Point Numbers368
Arithmeticwith Floating-Point Numbers370
10.5 User-Defined Simple Types373
The Typedef Statement373
Enumeration Types373
Named and Anonymous Data Types379
User-Written Header Files379
10.6 More on Type Coercion380
Type Coercion in Arithmetic and Relational Expressions381
Type Coercion in Assignments, Argument Passing, and Return of a Functional Value382
Programming Example383
Testing and Debugging390
Floating-Point Data390
Coping with Input Errors391
Testing and Debugging Hints391
Summary392
Quick Check393
Exam Preparation Exercises394
Programming Warm-Up Exercises395
Programming Problems396
Programming Example Follow-Up399
11Structured Types, Data Abstraction, and Classes401
11.1 Structured Data Types402
11.2 Records (Structs)403
Accessing Individual Components405
Aggregate Operations on Structs406
Hierarchical Records408
11.3 Unions410
11.4 Data Abstraction411
11.5 Abstract Data Types411
11.6 C++ Classes414
Classes, Class Objects, and Class Members416
Built-In Operations on Class Objects416
Class Scope419
Information Hiding419
11.7 Specification and Implementation Files421
The Specification File421
The Implementation File423
Compiling and Linking a Multifile Program428
11.8 Guaranteed Initialization with Class Constructors430
Invoking a Constructor431
Revised Specication and Implementation Files for Time432
Guidelines for Using Class Constructors436
Programming Example437
Testing and Debugging444
Testing and Debugging Hints447
Summary448
Quick Check449
Exam Preparation Exercises450
Programming Warm-Up Exercises452
Programming Problems453
Programming Example Follow-Up456
12Arrays457
12.1 One-Dimensional Arrays458
Declaring Arrays460
Accessing Individual Components460
Out-of-Bounds Array Indexes462
Initializing Arrays in Declarations464
Examples of Declaring and Accessing Arrays464
Passing Arrays as Arguments469
Assertions About Arrays471
Using Typedef with Arrays471
12.2 Arrays of Records and Objects471
Arrays of Records472
Arrays of Class Objects473
12.3 Special Kinds of Array Processing474
Subarray Processing474
Indexes with Semantic Content475
12.4 Two-Dimensional Arrays475
12.5 Processing Two-Dimensional Arrays478
Sum the Rows479
Sum the Columns481
Initialize the Array481
Print the Array483
12.6 Passing Two-Dimensional Arrays as Arguments484
12.7 Another Way of Defining Two-Dimensional Arrays486
12.8 Multidimensional Arrays488
Programming Example491
Testing and Debugging498
One-Dimensional Arrays498
Multidimensional Arrays499
Testing and Debugging Hints500
Summary501
Quick Check502
Exam Preparation Exercises503
Programming Warm-Up Exercises506
Programming Problems508
Programming Example Follow-Up510
13Array-Based Lists511
13.1 The List as an Abstract Data Type512
13.2 Unsorted Lists519
Basic Operations519
Insertion and Deletion522
Sequential Search523
lterators526
Sorting528
13.3 Sorted Lists531
Basic Operations534
Insertion534
Sequential Search537
Binary Search537
Deletion543
13.4 Understanding Character Strings544
Initializing C Strings547
C String Input and Output547
C String Library Routines550
Programming Example552
Testing and Debugging559
Testing and Debugging Hints560
Summary560
Quick Check561
Exam Preparation Exercises561
Programming Warm-Up Exercises562
Programming Problems564
Programming Example Follow-Up565
14Object-Oriented Software Development567
14.1 Object-Oriented Programming568
14.2 Objects568
14.3 Inheritance573
Deriving One Class from Another574
Specification of the ExtTime Class576
Implementation of the ExtTime Class579
Avoiding Multiple Inclusion of Header Files583
14.4 Composition584
Design of an Entry Class584
Constructor lnitializer590
14.5 Dynamic Binding and Virtual Functions591
The Slicing Problem592
Virtual Functions594
14.6 Object-Oriented Design596
Step 1: Identify the Objects and Operations596
Step 2: Determine the Relationships Among Objects597
Step 3: Design the Driver597
14.7 Implementing the Design597
Programming Example598
Testing and Debugging608
Testing and Debugging Hints609
Summary610
Quick Check610
Exam Preparation Exercises611
Programming Warm-Up Exercises614
Programming Problems616
Programming Example Follow-Up618
15Recursion619
15.1 What Is Recursion620
15.2 Recursive Algorithms with Sample Variables624
15.3 Towers of Hanoi626
15.4 Recursive Algorithms with Structured Variables631
15.5 Recursion or Iteration?632
Testing and Debugging634
Testing and Debugging Hints634
Summary635
Quick Check635
Exam Preparation Exercises635
Programming Warm-Up Exercises637
Programming Problems640
Glossary643
Answers to Selected Exercises651
Appendices683
Index705