| About Research & Education Association |
|
iii | |
| Acknowledgments |
|
iv | |
| Preface |
|
xiii | |
| About the Test |
|
xiii | |
| Which Exam Should You Take? |
|
xiv | |
| About the Review |
|
xv | |
| About the Case Study |
|
xv | |
| About the Programs in this Book |
|
xvi | |
| Scoring the AP and Practice Exams |
|
xvi | |
| Scoring the Multiple-Choice Section |
|
xvi | |
| Scoring the Free-Response Questions |
|
xvii | |
| The Composite Score |
|
xvii | |
| Studying for Your AP Examination |
|
xviii | |
| Test-Taking Tips |
|
xix | |
| Independent Study Schedule |
|
xix | |
| AP Computer Science Course Review |
|
|
|
|
3 | (6) |
|
|
|
3 | (1) |
|
|
|
4 | (1) |
|
Primary and Secondary Memory |
|
|
5 | (1) |
|
|
|
6 | (1) |
|
|
|
6 | (2) |
|
|
|
7 | (1) |
|
|
|
7 | (1) |
|
Types of Computer Systems |
|
|
8 | (1) |
|
|
|
9 | (4) |
|
|
|
9 | (1) |
|
|
|
10 | (1) |
|
|
|
10 | (1) |
|
|
|
11 | (2) |
|
|
|
11 | (1) |
|
|
|
11 | (2) |
|
Features of an Object-Oriented Programming Language: C++ |
|
|
13 | (120) |
|
|
|
13 | (1) |
|
|
|
13 | (8) |
|
|
|
13 | (1) |
|
|
|
13 | (1) |
|
|
|
14 | (1) |
|
|
|
14 | (1) |
|
|
|
15 | (1) |
|
|
|
16 | (2) |
|
|
|
18 | (1) |
|
|
|
18 | (1) |
|
|
|
19 | (1) |
|
|
|
19 | (1) |
|
|
|
20 | (1) |
|
|
|
20 | (1) |
|
|
|
21 | (5) |
|
|
|
22 | (2) |
|
|
|
24 | (2) |
|
|
|
26 | (39) |
|
|
|
27 | (2) |
|
|
|
29 | (1) |
|
|
|
29 | (1) |
|
|
|
29 | (2) |
|
|
|
31 | (1) |
|
|
|
32 | (1) |
|
|
|
32 | (1) |
|
|
|
33 | (3) |
|
|
|
36 | (1) |
|
|
|
37 | (2) |
|
|
|
39 | (5) |
|
|
|
44 | (1) |
|
Pointer Types, Pointer Variables and Dynamic Allocation of Memory* |
|
|
45 | (1) |
|
Static Sequential Memory Allocation |
|
|
45 | (1) |
|
Dynamic Allocation of Memory |
|
|
46 | (1) |
|
Pointer Types and Pointer Variables |
|
|
47 | (1) |
|
|
|
48 | (3) |
|
|
|
51 | (3) |
|
|
|
54 | (11) |
|
|
|
65 | (1) |
|
|
|
65 | (1) |
|
Expressions and Evaluation |
|
|
66 | (8) |
|
|
|
66 | (3) |
|
|
|
69 | (1) |
|
Algebraic Orders and Tree Traversals |
|
|
69 | (1) |
|
|
|
70 | (2) |
|
|
|
72 | (1) |
|
|
|
73 | (1) |
|
|
|
73 | (1) |
|
|
|
74 | (2) |
|
Examples of Simple Assignment Statements |
|
|
75 | (1) |
|
|
|
76 | (17) |
|
|
|
76 | (1) |
|
|
|
77 | (1) |
|
|
|
77 | (4) |
|
|
|
81 | (1) |
|
|
|
81 | (1) |
|
|
|
82 | (2) |
|
|
|
84 | (2) |
|
|
|
86 | (1) |
|
|
|
86 | (1) |
|
|
|
87 | (1) |
|
|
|
88 | (1) |
|
Procedural Control Structures |
|
|
89 | (1) |
|
Labels and Jump Statements |
|
|
89 | (1) |
|
|
|
89 | (1) |
|
|
|
90 | (1) |
|
|
|
90 | (1) |
|
|
|
91 | (1) |
|
|
|
91 | (1) |
|
|
|
92 | (1) |
|
Files and Input/Output Operations |
|
|
93 | (6) |
|
|
|
93 | (1) |
|
Standard System Input/Output Files |
|
|
94 | (1) |
|
|
|
94 | (1) |
|
Input Operations on Files |
|
|
94 | (1) |
|
Output Operations on Files |
|
|
95 | (2) |
|
|
|
97 | (2) |
|
|
|
99 | (10) |
|
|
|
99 | (2) |
|
|
|
101 | (1) |
|
|
|
101 | (1) |
|
Member Name Qualification |
|
|
102 | (1) |
|
|
|
102 | (1) |
|
|
|
103 | (1) |
|
|
|
103 | (1) |
|
|
|
103 | (1) |
|
Construction and Destruction |
|
|
103 | (1) |
|
|
|
104 | (1) |
|
|
|
105 | (1) |
|
|
|
105 | (1) |
|
|
|
105 | (4) |
|
|
|
109 | (12) |
|
|
|
110 | (3) |
|
|
|
113 | (2) |
|
Recursive Calls and the Stack |
|
|
115 | (3) |
|
|
|
118 | (3) |
|
|
|
121 | (1) |
|
|
|
122 | (2) |
|
|
|
122 | (1) |
|
|
|
123 | (1) |
|
Member Function Templates |
|
|
123 | (1) |
|
Standard Template Library |
|
|
124 | (1) |
|
|
|
124 | (9) |
|
|
|
125 | (2) |
|
Constructors and Destructors |
|
|
127 | (1) |
|
|
|
128 | (1) |
|
|
|
129 | (1) |
|
|
|
130 | (1) |
|
The terminate () Function |
|
|
130 | (1) |
|
The unexpected () Function |
|
|
130 | (1) |
|
|
|
131 | (2) |
|
Fundamental Data Structures |
|
|
133 | (70) |
|
|
|
133 | (2) |
|
|
|
133 | (1) |
|
|
|
134 | (1) |
|
|
|
135 | (9) |
|
Data Abstraction and Classes |
|
|
135 | (5) |
|
|
|
140 | (1) |
|
|
|
141 | (3) |
|
|
|
144 | (9) |
|
|
|
144 | (4) |
|
The Linked List Implementation |
|
|
148 | (3) |
|
|
|
151 | (1) |
|
|
|
151 | (1) |
|
|
|
151 | (1) |
|
|
|
152 | (1) |
|
|
|
153 | (10) |
|
Stack Structure and Operations* |
|
|
153 | (1) |
|
|
|
154 | (2) |
|
|
|
156 | (1) |
|
|
|
156 | (1) |
|
|
|
157 | (2) |
|
|
|
159 | (1) |
|
|
|
160 | (2) |
|
|
|
162 | (1) |
|
|
|
163 | (12) |
|
Queue Structure and Operations* |
|
|
163 | (1) |
|
Implementing Queues Using Arrays |
|
|
164 | (1) |
|
The Underlying Data Structure |
|
|
164 | (1) |
|
|
|
165 | (1) |
|
Issue 1: Storage of Items in a Queue |
|
|
165 | (1) |
|
Issue 2: Filling the Underlying Array |
|
|
166 | (1) |
|
Issue 3: Testing for an Empty Queue |
|
|
166 | (3) |
|
|
|
169 | (2) |
|
Implementing Queues and Linked Lists |
|
|
171 | (3) |
|
Implementing Queues Using Circular Linked Lists |
|
|
174 | (1) |
|
|
|
174 | (1) |
|
|
|
174 | (1) |
|
Hiding the Implementation* |
|
|
175 | (3) |
|
|
|
178 | (6) |
|
|
|
178 | (1) |
|
|
|
178 | (1) |
|
|
|
179 | (1) |
|
Two-and Higher-Dimension Arrays |
|
|
180 | (2) |
|
|
|
182 | (1) |
|
|
|
183 | (1) |
|
|
|
184 | (19) |
|
|
|
184 | (3) |
|
|
|
187 | (2) |
|
|
|
189 | (1) |
|
Pointer and Implementation Example |
|
|
189 | (2) |
|
|
|
191 | (1) |
|
Inserting into an Ordered Tree |
|
|
192 | (1) |
|
Example: Repeated Insertions into an Ordered Tree |
|
|
193 | (1) |
|
Deleting from an Ordered Tree |
|
|
193 | (2) |
|
|
|
195 | (3) |
|
|
|
198 | (2) |
|
|
|
200 | (3) |
|
|
|
203 | (208) |
|
|
|
203 | (1) |
|
|
|
203 | (1) |
|
|
|
204 | (9) |
|
|
|
204 | (1) |
|
|
|
205 | (1) |
|
|
|
206 | (2) |
|
|
|
208 | (1) |
|
|
|
208 | (1) |
|
|
|
209 | (1) |
|
|
|
209 | (1) |
|
|
|
210 | (1) |
|
|
|
211 | (1) |
|
|
|
211 | (1) |
|
|
|
211 | (2) |
|
|
|
213 | (7) |
|
|
|
213 | (1) |
|
|
|
213 | (4) |
|
|
|
217 | (2) |
|
|
|
219 | (1) |
|
|
|
220 | (3) |
|
|
|
220 | (1) |
|
|
|
220 | (1) |
|
|
|
221 | (1) |
|
|
|
221 | (1) |
|
|
|
222 | (1) |
|
|
|
222 | (1) |
|
|
|
223 | (13) |
|
|
|
223 | (1) |
|
|
|
223 | (3) |
|
|
|
226 | (1) |
|
Exchanging Elements and Adjusting |
|
|
227 | (1) |
|
|
|
228 | (1) |
|
|
|
229 | (1) |
|
|
|
230 | (3) |
|
|
|
233 | (3) |
|
Numerical Integration* |
|
|
236 | (3) |
| AP COMPUTER SCIENCE A PRACTICE EXAM |
|
|
|
|
239 | (48) |
|
|
|
240 | (1) |
|
|
|
241 | (26) |
|
|
|
267 | (1) |
|
Detailed Explanations of Answers |
|
|
268 | (19) |
| AP COMPUTER SCIENCE A PRACTICE EXAM |
|
|
|
|
287 | (46) |
|
|
|
288 | (1) |
|
|
|
289 | (24) |
|
|
|
313 | (1) |
|
Detailed Explanations of Answers |
|
|
314 | (19) |
| AP COMPUTER SCIENCE AB PRACTICE EXAM |
|
|
|
|
333 | (38) |
|
|
|
334 | (1) |
|
|
|
335 | (24) |
|
|
|
359 | (1) |
|
Detailed Explanations of Answers |
|
|
360 | (11) |
| AP COMPUTER SCIENCE AB PRACTICE EXAM |
|
|
|
|
371 | (40) |
|
|
|
372 | (1) |
|
|
|
373 | (21) |
|
|
|
394 | (1) |
|
Detailed Explanations of Answers |
|
|
395 | (16) |
| SAMPLE CASE STUDY |
|
411 | (34) |
|
|
|
413 | (32) |
|
|
|
416 | (5) |
|
|
|
421 | (3) |
|
The Text Adventure Program |
|
|
424 | (21) |
| Glossary |
|
445 | |