|
|
 |
|
|
|
|
Problem-solving programmingphase, 3-4, 152 |
|
|
|
 |
|
|
|
|
Problem-solving techniques, 19-20 |
|
|
|
 |
|
|
|
|
algorithm walk-through in, 230-234 |
|
|
|
 |
|
|
|
|
algorithmic, 26 |
|
|
|
 |
|
|
|
|
analogies for, 22-23 |
|
|
|
 |
|
|
|
|
asking questions, 20 |
|
|
|
 |
|
|
|
|
building-block approach, 24-25, 28, 164 |
|
|
|
 |
|
|
|
|
divide and conquer, 24, 27, 153,162 |
|
|
|
 |
|
|
|
|
looking for familiar, 21-22 |
|
|
|
 |
|
|
|
|
means-ends analysis, 22-23, 27 |
|
|
|
 |
|
|
|
|
for mental blocks, 25-26 |
|
|
|
 |
|
|
|
|
merging solutions, 25 |
|
|
|
 |
|
|
|
|
preconditions and postconditions in, 231-234 |
|
|
|
 |
|
|
|
|
Procedural programming, 906-908 |
|
|
|
 |
|
|
|
|
Procedures, 104. See also Functions |
|
|
|
 |
|
|
|
|
ProcessName function (Exam), 694 |
|
|
|
 |
|
|
|
|
ProcessPlays function (Game), 566 |
|
|
|
 |
|
|
|
|
Procrastinator's technique, 156 |
|
|
|
 |
|
|
|
|
Programming, 2-3 |
|
|
|
 |
|
|
|
|
design implementation in, 157-161 |
|
|
|
 |
|
|
|
|
languages for, 6, 9-14 |
|
|
|
 |
|
|
|
|
modules in, 154-156 |
|
|
|
 |
|
|
|
|
object-oriented. See Objectoriented programming (OOP) |
|
|
|
 |
|
|
|
|
object-oriented design for, 161-164 |
|
|
|
 |
|
|
|
|
phases in, 3-8, 152 |
|
|
|
 |
|
|
|
|
scales in, 174-175, 906 |
|
|
|
 |
|
|
|
|
style in. See Style in programming |
|
|
|
 |
|
|
|
|
top-down design for, 152-156, 162 |
|
|
|
 |
|
|
|
|
Programming in the large, 174-175 |
|
|
|
 |
|
|
|
|
Programming in the small, 174 |
|
|
|
 |
|
|
|
|
Programs |
|
|
|
 |
|
|
|
|
blocks in, 73-75 |
|
|
|
 |
|
|
|
|
compiling and running, 78-80, 859-861 |
|
|
|
 |
|
|
|
|
constructing, 71-77 |
|
|
|
 |
|
|
|
|
data types in, 52-56 |
|
|
|
 |
|
|
|
|
debugging, 79-81. |
|
|
|
 |
|
|
|
|
See also Debugging |
|
|
|
 |
|
|
|
|
entering, 77-78 |
|
|
|
 |
|
|
|
|
executing, 6, 12 |
|
|
|
 |
|
|
|
|
external variables in, 396-397 |
|
|
|
 |
|
|
|
|
formatting, 113-115, A36-A37 |
|
|
|
 |
|
|
|
|
identifiers in, 49-52 |
|
|
|
 |
|
|
|
|
implementation of, 234-239 |
|
|
|
 |
|
|
|
|
input/output for. |
|
|
|
 |
|
|
|
|
See Input; |
|
|
|
 |
|
|
|
|
Output |
|
|
|
 |
|
|
|
|
multifile, 359, 396-397, 859-861 |
|
|
|
 |
|
|
|
|
preprocessor for, 76-77 |
|
|
|
 |
|
|
|
|
structure of, 42-45 |
|
|
|
 |
|
|
|
|
syntax and semantics in, 45-46 |
|
|
|
 |
|
|
|
|
syntax template for, 71-72, A12 |
|
|
|
 |
|
|
|
|
testing, 6, 175 |
|
|
|
 |
|
|
|
|
tracing execution of, 234-237, 312 |
|
|
|
 |
|
|
|
|
Project directors, 174 |
|
|
|
 |
|
|
|
|
Project files, 860-861 |
|
|
|
 |
|
|
|
|
Prolog language, 11n |
|
|
|
 |
|
|
|
|
Promotion of data types, 547-549 |
|
|
|
 |
|
|
|
|
Prompting messages, 27, 142-144 |
|
|
|
 |
|
|
|
|
Properties, inheriting. |
|
|
|
 |
|
|
|
|
See Inheritance |
|
|
|
 |
|
|
|
|
Prototypes |
|
|
|
 |
|
|
|
|
function, 328, 335-337 |
|
|
|
 |
|
|
|
|
header files for, 342 |
|
|
|
 |
|
|
|
|
in specification files, 852-854 |
|
|
|
 |
|
|
|
|
Provincial Letters (Pascal), 101 |
|
|
|
 |
|
|
|
|
Pseudocode, 156 |
|
|
|
 |
|
|
|
|
PtrToClone function, 1139-1142 |
|
|
|
 |
|
|
|
|
Public base classes, 913 |
|
|
|
 |
|
|
|
|
Public class interface, 844-846 |
|
|
|
 |
|
|
|
|
for information sharing, 850-852 |
|
|
|
 |
|
|
|
|
for objects, 163 |
|
|
|
 |
|
|
|
|
for Time class, 911-912 |
|
|
|
 |
|
|
|
|
public reserved word, 844-845 |
|
|
|
 |
|
|
|
|
Punch function (TimeCard class), 922, 941, 943 |
|
|
|
 |
|
|
|
|
PunchIn program, 952-956 |
|
|
|
 |
|
|
|
|
Punctuation characters, testing for, A4 |
|
|
|
 |
|
|
|
|
Pythagorean Theorem case study, 165-168 |
|
|
|
 |
|
|
|
|
Quadratic time execution, 285-286 |
|
|
|
 |
|
|
|
|
Qualified name, syntax template for, A18 |
|
|
|
 |
|
|
|
|
Question mark (?), 515-516 |
|
|
|
 |
|
|
|
|
Questions, asking, 20 |
|
|
|
 |
|
|
|
|
Quotation marks (' "). |
|
|
|
 |
|
|
|
|
See |
|
|
|
 |
|
|
|
|
Apostrophe ('); |
|
|
|
 |
|
|
|
|
Double quotation mark (") |
|
|
|
 |
|
|
|
|
\r escape sequence, 521 |
|
|
|
 |
|
|
|
|
Rainfall averages case study, 486-492 |
|
|
|
 |
|
|
|
|
Rainfall program, 488-492 |
|
|
|
 |
|
|
|
|
Raising integers to power function |
|
|
|
 |
|
|
|
|
using iteration, 410-411 |
|
|
|
 |
|
|
|
|
using recursion, 1120-1124 |
|
|
|
 |
|
|
|
|
RAM (random access memory), 15n. |
|
|
|
 |
|
|
|
|
See also Memory |
|
|
|
 |
|
|
|
|
rand function, 1096, A9 |
|
|
|
 |
|
|
|
|
RAND_MAX constant, 1096 |
|
|
|
 |
|
|
|
|
Random access methods, 713 |
|
|
|
 |
|
|
|
|
Random numbers, 1096, A9 |
|
|
|
 |
|
|
|
|
Range of values |
|
|
|
 |
|
|
|
|
for array indices, 596, 758 |
|
|
|
 |
|
|
|
|
for floating-point numbers, 508 |
|
|
|
 |
|
|
|
|
for integers, 504-505 |
|
|
|
 |
|
|
|
|
Readability. |
|
|
|
 |
|
|
|
|
See also Style in programming |
|
|
|
 |
|
|
|
|
blank lines for, 73 |
|
|
|
 |
|
|
|
|
character-testing functions for, 413-414 |
|
|
|
 |
|
|
|
|
comments for, A32-A35 |
|
|
|
 |
|
|
|
|
versus efficiency, 211 |
|
|
|
 |
|
|
|
|
enumeration types for, 542 |
|
|
|
 |
|
|
|
|
of expression statements, 511 |
|
|
|
|
|