|
Overview of Programming and Problem Solving |
|
|
1 | (46) |
|
|
|
2 | (8) |
|
|
|
2 | (1) |
|
How Do We Write a Program? |
|
|
3 | (5) |
|
Theoretical Foundations: Binary Representation of Data |
|
|
8 | (2) |
|
What is a Programming Language? |
|
|
10 | (6) |
|
Background Information: Compilers and Interpreters |
|
|
13 | (3) |
|
|
|
16 | (9) |
|
Background Information: PCs, Workstations, and Mainframes |
|
|
19 | (5) |
|
Background Information: The Origins of C++ |
|
|
24 | (1) |
|
Ethics and Responsibilities in the Computing Profession |
|
|
25 | (5) |
|
|
|
26 | (1) |
|
|
|
27 | (1) |
|
Use of Computer Resources |
|
|
28 | (1) |
|
|
|
29 | (1) |
|
Problem-Solving Techniques |
|
|
30 | (6) |
|
|
|
30 | (1) |
|
Look for Things That Are Familiar |
|
|
31 | (1) |
|
|
|
31 | (1) |
|
|
|
32 | (1) |
|
|
|
33 | (1) |
|
The Building-Block Approach |
|
|
34 | (1) |
|
|
|
34 | (1) |
|
Mental Blocks: The Fear of Starting |
|
|
35 | (1) |
|
Algorithmic Problem Solving |
|
|
36 | (1) |
|
Problem-Solving Case Study: An Algorithm for a Company Payroll |
|
|
36 | (5) |
|
|
|
41 | (6) |
|
|
|
42 | (1) |
|
Exam Preparation Exercises |
|
|
43 | (1) |
|
Programming Warm-up Exercises |
|
|
44 | (1) |
|
|
|
45 | (2) |
|
C++ Syntax and Semantics, and the Program Development Process |
|
|
47 | (54) |
|
The Elements of C++ Programs |
|
|
48 | (25) |
|
|
|
48 | (3) |
|
|
|
51 | (1) |
|
Theoretical Foundations: Metalanguages |
|
|
52 | (1) |
|
|
|
53 | (3) |
|
Naming Program Elements: Identifiers |
|
|
56 | (1) |
|
Matters of Style: Using Meaningful, Readable Identifiers |
|
|
57 | (1) |
|
|
|
58 | (1) |
|
Background Information: Data Storage |
|
|
58 | (3) |
|
Naming Elements: Declarations |
|
|
61 | (4) |
|
Matters of Style: Capitalization of Identifiers |
|
|
65 | (1) |
|
Taking Action: Executable Statements |
|
|
66 | (6) |
|
Beyond Minimalism: Adding Comments to a Program |
|
|
72 | (1) |
|
|
|
73 | (8) |
|
Blocks (Compound Statements) |
|
|
75 | (3) |
|
|
|
78 | (1) |
|
An Introduction to Namespaces |
|
|
79 | (2) |
|
|
|
81 | (2) |
|
|
|
81 | (1) |
|
Inserting Blanks Within a Line |
|
|
82 | (1) |
|
Program Entry, Correction, and Execution |
|
|
83 | (3) |
|
|
|
83 | (1) |
|
Compiling and Running a Program |
|
|
84 | (2) |
|
|
|
86 | (1) |
|
Problem-Solving Case Study: Contest Letter |
|
|
86 | (5) |
|
|
|
91 | (1) |
|
|
|
92 | (9) |
|
|
|
93 | (2) |
|
Exam Preparation Exercises |
|
|
95 | (3) |
|
Programming Warm-up Exercises |
|
|
98 | (1) |
|
|
|
99 | (1) |
|
|
|
100 | (1) |
|
Numeric Types, Expressions, and Output |
|
|
101 | (52) |
|
Overview of C++ Data Types |
|
|
102 | (1) |
|
|
|
103 | (2) |
|
|
|
103 | (1) |
|
|
|
104 | (1) |
|
Declarations for Numeric Types |
|
|
105 | (2) |
|
Named Constant Declarations |
|
|
105 | (1) |
|
Software Engineering Tip: Using Names Constants Instead of Literals |
|
|
106 | (1) |
|
|
|
106 | (1) |
|
Simple Arithmetic Expressions |
|
|
107 | (5) |
|
|
|
107 | (3) |
|
Increment and Decrement Operators |
|
|
110 | (2) |
|
Compound Arithmetic Expressions |
|
|
112 | (6) |
|
|
|
112 | (1) |
|
Type Coercion and Type Casting |
|
|
113 | (4) |
|
May We Introduce: Blaise Pascal |
|
|
117 | (1) |
|
Function Calls and Library Functions |
|
|
118 | (5) |
|
Value-Returning Functions |
|
|
118 | (2) |
|
|
|
120 | (2) |
|
|
|
122 | (1) |
|
|
|
123 | (8) |
|
|
|
123 | (3) |
|
|
|
126 | (3) |
|
Matters of Style: Program Formatting |
|
|
129 | (2) |
|
Additional string Operations |
|
|
131 | (6) |
|
The length and size Functions |
|
|
131 | (1) |
|
|
|
132 | (2) |
|
|
|
134 | (2) |
|
Software Engineering Tip: Understanding Before Changing |
|
|
136 | (1) |
|
Problem-Solving Case Study: Map Measurements |
|
|
137 | (4) |
|
|
|
141 | (1) |
|
|
|
142 | (11) |
|
|
|
142 | (3) |
|
Exam Preparation Exercises |
|
|
145 | (3) |
|
Programming Warm-up Exercises |
|
|
148 | (3) |
|
|
|
151 | (1) |
|
|
|
152 | (1) |
|
Program Input and the Software Design Process |
|
|
153 | (58) |
|
Getting Data into Programs |
|
|
154 | (11) |
|
Input Streams and the Extraction Operator (>>) |
|
|
155 | (3) |
|
The Reading Marker and the Newline Character |
|
|
158 | (2) |
|
Reading Character Data with the get Function |
|
|
160 | (2) |
|
Theoretical Foundations: More About Functions and Arguments |
|
|
162 | (1) |
|
Skipping Characters with the ignore Function |
|
|
162 | (1) |
|
|
|
163 | (2) |
|
|
|
165 | (2) |
|
Noninteractive Input/Output |
|
|
167 | (1) |
|
|
|
167 | (8) |
|
|
|
168 | (1) |
|
|
|
168 | (4) |
|
An Example Program Using Files |
|
|
172 | (2) |
|
Run-Time Input of File Names |
|
|
174 | (1) |
|
|
|
175 | (2) |
|
Software Design Methodologies |
|
|
177 | (1) |
|
|
|
178 | (1) |
|
|
|
179 | (2) |
|
|
|
181 | (11) |
|
|
|
182 | (3) |
|
|
|
185 | (6) |
|
|
|
191 | (1) |
|
Software Engineering Tip: Documentation |
|
|
191 | (1) |
|
Problem-Solving Case Study: Stretching a Canvas |
|
|
192 | (8) |
|
Background Information: Programming on Many Scales |
|
|
198 | (2) |
|
|
|
200 | (2) |
|
Testing and Debugging Hints |
|
|
201 | (1) |
|
|
|
202 | (9) |
|
|
|
203 | (1) |
|
Exam Preparation Exercises |
|
|
204 | (2) |
|
Programming Warm-up Exercises |
|
|
206 | (2) |
|
|
|
208 | (1) |
|
|
|
209 | (2) |
|
Conditions, Logical Expressions, and Selection Control Structures |
|
|
211 | (64) |
|
|
|
212 | (2) |
|
|
|
213 | (1) |
|
Conditions and Logical Expressions |
|
|
214 | (15) |
|
|
|
214 | (1) |
|
Background Information: Before the bool Type |
|
|
215 | (1) |
|
|
|
216 | (8) |
|
May We Introduce: George Boole |
|
|
224 | (1) |
|
|
|
225 | (2) |
|
Software Engineering Tip: Changing English Statements into Logical Expressions |
|
|
227 | (1) |
|
Relational Operators with Floating-Point Types |
|
|
228 | (1) |
|
|
|
229 | (7) |
|
|
|
229 | (3) |
|
Blocks (Compound Statements) |
|
|
232 | (1) |
|
Matters of Style: Braces and Blocks |
|
|
233 | (1) |
|
|
|
234 | (2) |
|
|
|
236 | (1) |
|
|
|
236 | (5) |
|
|
|
240 | (1) |
|
Testing the State of an I/O Stream |
|
|
241 | (2) |
|
Problem-Solving Case Study: Warning Notices |
|
|
243 | (6) |
|
|
|
249 | (15) |
|
Testing in the Problem-Solving Phase: The Algorithm Walk-Through |
|
|
249 | (4) |
|
Testing in the Implementation Phase |
|
|
253 | (6) |
|
|
|
259 | (1) |
|
Tests Performed Automatically During Compilation and Execution |
|
|
260 | (2) |
|
Testing and Debugging Hints |
|
|
262 | (2) |
|
|
|
264 | (11) |
|
|
|
264 | (1) |
|
Exam Preparation Exercises |
|
|
265 | (3) |
|
Programming Warm-up Exercises |
|
|
268 | (3) |
|
|
|
271 | (3) |
|
|
|
274 | (1) |
|
|
|
275 | (50) |
|
|
|
276 | (2) |
|
|
|
278 | (2) |
|
Loops Using the While Statement |
|
|
280 | (12) |
|
|
|
280 | (2) |
|
|
|
282 | (6) |
|
|
|
288 | (4) |
|
|
|
292 | (4) |
|
Designing the Flow of Control |
|
|
292 | (2) |
|
Designing the Process Within the Loop |
|
|
294 | (1) |
|
|
|
295 | (1) |
|
|
|
296 | (11) |
|
|
|
300 | (2) |
|
Theoretical Foundations: Analysis of Algorithms |
|
|
302 | (5) |
|
Problem-Solving Case Study: Average Income by Gender |
|
|
307 | (6) |
|
|
|
313 | (4) |
|
|
|
313 | (1) |
|
Test Plans Involving Loops |
|
|
314 | (1) |
|
Testing and Debugging Hints |
|
|
315 | (2) |
|
|
|
317 | (8) |
|
|
|
318 | (1) |
|
Exam Preparation Exercises |
|
|
318 | (3) |
|
Programming Warm-up Exercises |
|
|
321 | (1) |
|
|
|
322 | (2) |
|
|
|
324 | (1) |
|
|
|
325 | (66) |
|
Functional Decomposition with Void Functions |
|
|
326 | (6) |
|
|
|
327 | (1) |
|
Writing Modules as Void Functions |
|
|
327 | (4) |
|
May We Introduce: Charles Babbage |
|
|
331 | (1) |
|
An Overview of User-Defined Functions |
|
|
332 | (4) |
|
Flow of Control in Function Calls |
|
|
332 | (1) |
|
|
|
333 | (3) |
|
Syntax and Semantics of Void Functions |
|
|
336 | (8) |
|
Function Call (Invocation) |
|
|
336 | (1) |
|
Function Declarations and Definitions |
|
|
337 | (3) |
|
|
|
340 | (1) |
|
|
|
341 | (2) |
|
Matters of Style: Naming Void Functions |
|
|
343 | (1) |
|
|
|
343 | (1) |
|
|
|
344 | (10) |
|
|
|
345 | (1) |
|
|
|
346 | (4) |
|
|
|
350 | (1) |
|
Matching Arguments with Parameters |
|
|
350 | (3) |
|
Theoretical Foundations: Argument-Passing Mechanisms |
|
|
353 | (1) |
|
|
|
354 | (9) |
|
Writing Assertions as Program Comments |
|
|
356 | (2) |
|
Matters of Style: Function Preconditions and Postconditions |
|
|
358 | (1) |
|
Documenting the Direction of Data Flow |
|
|
358 | (2) |
|
Matters of Style: Formatting Function Headings |
|
|
360 | (1) |
|
Software Engineering Tip: Conceptual Versus Physical Hiding of a Function Implementation |
|
|
361 | (2) |
|
Problem-Solving Case Study: Comparison of Furniture-Store Sales |
|
|
363 | (9) |
|
|
|
372 | (4) |
|
The assert Library Function |
|
|
374 | (2) |
|
Testing and Debugging Hints |
|
|
376 | (1) |
|
|
|
376 | (15) |
|
|
|
377 | (1) |
|
Exam Preparation Exercises |
|
|
378 | (5) |
|
Programming Warm-up Exercises |
|
|
383 | (2) |
|
|
|
385 | (5) |
|
|
|
390 | (1) |
|
Scope, Lifetime, and More on Functions |
|
|
391 | (70) |
|
|
|
392 | (11) |
|
|
|
395 | (4) |
|
Variable Declarations and Definitions |
|
|
399 | (1) |
|
|
|
400 | (3) |
|
|
|
403 | (2) |
|
Initializations in Declarations |
|
|
404 | (1) |
|
|
|
405 | (6) |
|
|
|
406 | (3) |
|
|
|
409 | (1) |
|
May We Introduce: Ada Lovelace |
|
|
409 | (2) |
|
Value-Returning Functions |
|
|
411 | (12) |
|
|
|
416 | (3) |
|
Matters of Style: Naming Value-Returning Functions |
|
|
419 | (1) |
|
Interface Design and Side Effects |
|
|
420 | (1) |
|
When to Use Value-Returning Functions |
|
|
421 | (1) |
|
Background Information: Ignoring a Function Value |
|
|
421 | (2) |
|
Problem-Solving Case Study: Reformat Dates |
|
|
423 | (12) |
|
Software Engineering Tip: Control Abstraction, Functional Cohesion, and Communication Complexity |
|
|
434 | (1) |
|
Problem-Solving Case Study: Starship Weight and Balance |
|
|
435 | (11) |
|
|
|
446 | (4) |
|
|
|
447 | (2) |
|
Testing and Debugging Hints |
|
|
449 | (1) |
|
|
|
450 | (11) |
|
|
|
451 | (1) |
|
Exam Preparation Exercises |
|
|
452 | (3) |
|
Programming Warm-up Exercises |
|
|
455 | (2) |
|
|
|
457 | (2) |
|
|
|
459 | (2) |
|
Additional Control Structures |
|
|
461 | (32) |
|
|
|
462 | (6) |
|
May We Introduce: Admiral Grace Murray Hopper |
|
|
466 | (2) |
|
|
|
468 | (3) |
|
|
|
471 | (3) |
|
The Break and Continue Statements |
|
|
474 | (3) |
|
Guidelines for Choosing a Looping Statement |
|
|
477 | (1) |
|
Problem-Solving Case Study: Monthly Rainfall Averages |
|
|
478 | (6) |
|
|
|
484 | (1) |
|
Testing and Debugging Hints |
|
|
484 | (1) |
|
|
|
485 | (8) |
|
|
|
485 | (1) |
|
Exam Preparation Exercises |
|
|
486 | (2) |
|
Programming Warm-up Exercises |
|
|
488 | (1) |
|
|
|
489 | (2) |
|
|
|
491 | (2) |
|
Simple Data Types: Built-In and User-Defined |
|
|
493 | (84) |
|
|
|
494 | (8) |
|
|
|
496 | (4) |
|
|
|
500 | (2) |
|
|
|
502 | (9) |
|
Assignment Operators and Assignment Expressions |
|
|
503 | (2) |
|
Increment and Decrement Operators |
|
|
505 | (1) |
|
|
|
505 | (1) |
|
|
|
506 | (1) |
|
|
|
507 | (1) |
|
|
|
507 | (1) |
|
|
|
508 | (3) |
|
Working with Character Data |
|
|
511 | (9) |
|
|
|
511 | (2) |
|
|
|
513 | (2) |
|
|
|
515 | (5) |
|
More on Floating-Point Numbers |
|
|
520 | (12) |
|
Representation of Floating-Point Numbers |
|
|
520 | (3) |
|
Arithmetic with Floating-Point Numbers |
|
|
523 | (1) |
|
Implementation of Floating-Point Numbers in the Computer |
|
|
524 | (6) |
|
Background Information Practical Implications of Limited Precision |
|
|
530 | (1) |
|
Software Engineering Tip Choosing a Numeric Data Type |
|
|
531 | (1) |
|
User-Defined Simple Types |
|
|
532 | (11) |
|
|
|
532 | (1) |
|
|
|
533 | (8) |
|
Named and Anonymous Data Types |
|
|
541 | (1) |
|
User-Written Header Files |
|
|
542 | (1) |
|
|
|
543 | (4) |
|
Type Coercion in Arithmetic and Relational Expressions |
|
|
544 | (1) |
|
Type Coercion in Assignments, Argument Passing, and Return of a Function Value |
|
|
545 | (2) |
|
Problem-Solving Case Study: Finding the Area Under a Curve |
|
|
547 | (8) |
|
Problem-Solving Case Study: Rock, Paper, Scissors |
|
|
555 | (10) |
|
|
|
565 | (3) |
|
|
|
565 | (1) |
|
|
|
566 | (1) |
|
Testing and Debugging Hints |
|
|
567 | (1) |
|
|
|
568 | (9) |
|
|
|
569 | (1) |
|
Exam Preparation Exercises |
|
|
570 | (2) |
|
Programming Warm-up Exercises |
|
|
572 | (1) |
|
|
|
573 | (1) |
|
|
|
574 | (3) |
|
Structured Types, Data Abstraction, and Classes |
|
|
577 | (86) |
|
Simple Versus Structured Data Types |
|
|
578 | (1) |
|
|
|
579 | (10) |
|
Accessing Individual Components |
|
|
582 | (1) |
|
Aggregate Operations on Structs |
|
|
583 | (2) |
|
More About Struct Declarations |
|
|
585 | (2) |
|
|
|
587 | (2) |
|
|
|
589 | (1) |
|
|
|
590 | (2) |
|
|
|
592 | (4) |
|
Theoretical Foundations: Categories of Abstract Data Type Operations |
|
|
595 | (1) |
|
|
|
596 | (10) |
|
Matters of Style: Declaring Public and Private Class Members |
|
|
599 | (1) |
|
Classes, Class Objects, and Class Members |
|
|
600 | (1) |
|
Built-in Operations on Class Objects |
|
|
601 | (2) |
|
|
|
603 | (1) |
|
|
|
604 | (2) |
|
Specification and Implementation Files |
|
|
606 | (10) |
|
|
|
606 | (2) |
|
|
|
608 | (5) |
|
Compiling and Linking a Multifile Program |
|
|
613 | (3) |
|
Guaranteed Initialization with Class Constructors |
|
|
616 | (5) |
|
|
|
617 | (1) |
|
Revised Specification and Implementation Files for TimeType |
|
|
618 | (2) |
|
Guidelines for Using Class Constructors |
|
|
620 | (1) |
|
Problem-Solving Case Study: Manipulating Dates |
|
|
621 | (13) |
|
Problem-Solving Case Study: Birthday Calls |
|
|
634 | (10) |
|
|
|
644 | (5) |
|
Testing and Debugging Hints |
|
|
648 | (1) |
|
|
|
649 | (14) |
|
|
|
650 | (2) |
|
Exam Preparation Exercises |
|
|
652 | (4) |
|
Programming Warm-up Exercises |
|
|
656 | (2) |
|
|
|
658 | (3) |
|
|
|
661 | (2) |
|
|
|
663 | (80) |
|
|
|
664 | (17) |
|
|
|
666 | (1) |
|
Accessing Individual Components |
|
|
667 | (3) |
|
Out-of-Bounds Array Indexes |
|
|
670 | (1) |
|
Initializing Arrays in Declarations |
|
|
671 | (1) |
|
(Lack of) Aggregate Array Operations |
|
|
671 | (2) |
|
Examples of Declaring and Accessing Arrays |
|
|
673 | (3) |
|
Passing Arrays as Arguments |
|
|
676 | (3) |
|
Background Information: C, C++, and Arrays as Arguments |
|
|
679 | (1) |
|
|
|
679 | (1) |
|
Using Typedef with Arrays |
|
|
680 | (1) |
|
Arrays of Records and Class Objects |
|
|
681 | (3) |
|
|
|
681 | (2) |
|
|
|
683 | (1) |
|
Special Kinds of Array Processing |
|
|
684 | (1) |
|
|
|
684 | (1) |
|
Indexes with Semantic Content |
|
|
684 | (1) |
|
|
|
685 | (4) |
|
Processing Two-Dimensional Arrays |
|
|
689 | (6) |
|
|
|
690 | (1) |
|
|
|
691 | (1) |
|
|
|
692 | (2) |
|
|
|
694 | (1) |
|
Passing Two-Dimensional Arrays as Arguments |
|
|
695 | (3) |
|
Another Way of Defining Two-Dimensional Arrays |
|
|
698 | (2) |
|
|
|
700 | (3) |
|
Problem-Solving Case Study: Comparison of Two Lists |
|
|
703 | (7) |
|
Problem-Solving Case Study: City Council Election |
|
|
710 | (11) |
|
|
|
721 | (5) |
|
|
|
721 | (1) |
|
|
|
722 | (1) |
|
|
|
723 | (2) |
|
Testing and Debugging Hints |
|
|
725 | (1) |
|
|
|
726 | (17) |
|
|
|
726 | (3) |
|
Exam Preparation Exercises |
|
|
729 | (5) |
|
Programming Warm-up Exercises |
|
|
734 | (3) |
|
|
|
737 | (4) |
|
|
|
741 | (2) |
|
|
|
743 | (58) |
|
The List as an Abstract Data Type |
|
|
744 | (4) |
|
|
|
748 | (10) |
|
|
|
748 | (3) |
|
|
|
751 | (1) |
|
|
|
752 | (3) |
|
|
|
755 | (3) |
|
|
|
758 | (15) |
|
|
|
761 | (1) |
|
|
|
761 | (3) |
|
|
|
764 | (1) |
|
|
|
765 | (5) |
|
|
|
770 | (2) |
|
Theoretical Foundations: Complexity of Searching and Sorting |
|
|
772 | (1) |
|
Understanding Character Strings |
|
|
773 | (10) |
|
|
|
776 | (1) |
|
C String Input and Output |
|
|
777 | (4) |
|
C String Library Routines |
|
|
781 | (2) |
|
String Class or C Strings? |
|
|
783 | (1) |
|
Problem-Solving Case Study: Exam Attendance |
|
|
783 | (9) |
|
|
|
792 | (1) |
|
Testing and Debugging Hints |
|
|
792 | (1) |
|
|
|
793 | (8) |
|
|
|
793 | (2) |
|
Exam Preparation Exercises |
|
|
795 | (2) |
|
Programming Warm-up Exercises |
|
|
797 | (1) |
|
|
|
798 | (1) |
|
|
|
799 | (2) |
|
Object-Oriented Software Development |
|
|
801 | (66) |
|
Object-Oriented Programming |
|
|
802 | (2) |
|
|
|
804 | (1) |
|
|
|
805 | (12) |
|
Deriving One Class from Another |
|
|
807 | (3) |
|
Software Engineering Tip: Inheritance and Accessibility |
|
|
810 | (1) |
|
Specification of the ExtTime Class |
|
|
811 | (1) |
|
Implementation of the ExtTime Class |
|
|
812 | (4) |
|
Avoiding Multiple Inclusion of Header Files |
|
|
816 | (1) |
|
|
|
817 | (5) |
|
Design of a TimeCard Class |
|
|
818 | (2) |
|
Implementation of the TimeCard Class |
|
|
820 | (2) |
|
Dynamic Binding and Virtual Functions |
|
|
822 | (5) |
|
|
|
823 | (2) |
|
|
|
825 | (2) |
|
|
|
827 | (4) |
|
Identify the Objects and Operations |
|
|
828 | (1) |
|
Determine the Relationships Among Objects |
|
|
829 | (1) |
|
|
|
830 | (1) |
|
Software Engineering Tip: The Iterative Nature of Object-Oriented Design |
|
|
830 | (1) |
|
|
|
831 | (1) |
|
Problem-Solving Case Study: Time Card Lookup |
|
|
832 | (22) |
|
|
|
854 | (1) |
|
Testing and Debugging Hints |
|
|
854 | (1) |
|
|
|
855 | (12) |
|
|
|
856 | (2) |
|
Exam Preparation Exercises |
|
|
858 | (4) |
|
Programming Warm-up Exercises |
|
|
862 | (1) |
|
|
|
863 | (1) |
|
|
|
864 | (3) |
|
Pointers, Dynamic Data, and Reference Types |
|
|
867 | (76) |
|
|
|
868 | (11) |
|
|
|
869 | (6) |
|
|
|
875 | (4) |
|
|
|
879 | (5) |
|
|
|
884 | (6) |
|
|
|
890 | (11) |
|
|
|
894 | (1) |
|
Shallow Versus Deep Copying |
|
|
895 | (2) |
|
|
|
897 | (4) |
|
Problem-Solving Case Study: Personnel Records |
|
|
901 | (16) |
|
Problem-Solving Case Study: Dynamic Arrays |
|
|
917 | (11) |
|
|
|
928 | (3) |
|
Testing and Debugging Hints |
|
|
930 | (1) |
|
|
|
931 | (12) |
|
|
|
932 | (2) |
|
Exam Preparation Exercises |
|
|
934 | (3) |
|
Programming Warm-up Exercises |
|
|
937 | (2) |
|
|
|
939 | (1) |
|
|
|
940 | (3) |
|
|
|
943 | (70) |
|
Sequential Versus Linked Structures |
|
|
944 | (2) |
|
Array Representation of a Linked List |
|
|
946 | (2) |
|
Dynamic Data Representation of a Linked List |
|
|
948 | (29) |
|
Algorithms on Dynamic Linked Lists |
|
|
956 | (19) |
|
|
|
975 | (1) |
|
Classes and Dynamic Linked Lists |
|
|
976 | (1) |
|
Choice of Data Representation |
|
|
977 | (2) |
|
Problem-Solving Case Study: Simulated Playing Cards |
|
|
979 | (7) |
|
Problem-Solving Case Study: Solitaire Simulation |
|
|
986 | (20) |
|
|
|
1006 | (1) |
|
Testing and Debugging Hints |
|
|
1006 | (1) |
|
|
|
1006 | (7) |
|
|
|
1007 | (1) |
|
Exam Preparation Exercises |
|
|
1008 | (2) |
|
Programming Warm-up Exercises |
|
|
1010 | (1) |
|
|
|
1011 | (1) |
|
|
|
1012 | (1) |
|
|
|
1013 | |
|
|
|
1014 | (4) |
|
Recursive Algorithms with Simple Variables |
|
|
1018 | (3) |
|
|
|
1021 | (5) |
|
Recursive Algorithms with Structured Variables |
|
|
1026 | (3) |
|
Recursion Using Pointer Variables |
|
|
1029 | (7) |
|
Printing a Dynamic Linked List in Reverse Order |
|
|
1029 | (3) |
|
Copying a Dynamic Linked List |
|
|
1032 | (4) |
|
|
|
1036 | (1) |
|
Problem-Solving Case Study: Converting Decimal Integers to Binary Integers |
|
|
1037 | (3) |
|
Problem-Solving Case Study Minimum Value in an Integer Array |
|
|
1040 | (3) |
|
|
|
1043 | (1) |
|
Testing and Debugging Hints |
|
|
1043 | (1) |
|
|
|
1043 | |
|
|
|
1044 | (1) |
|
Exam Preparation Exercises |
|
|
1044 | (2) |
|
Programming Warm-up Exercises |
|
|
1046 | (2) |
|
|
|
1048 | (1) |
|
|
|
1049 | |
| Appendix A Reserved Words |
|
1 | (1) |
| Appendix B Operator Precedence |
|
1 | (2) |
| Appendix C A Selection of Standard Library Routines |
|
3 | (9) |
| Appendix D Using This Book with a Prestandard Version of C++ |
|
12 | (4) |
| Appendix E Character Sets |
|
16 | (2) |
| Appendix F Program Style, Formatting, and Documentation |
|
18 | (9) |
| Glossary |
|
27 | (10) |
| Answers to Selected Exercises |
|
37 | (30) |
| Index |
|
67 | |