Skip to main content

How To Think Like a Computer Scientist C++ Edition The Pretext Interactive Version

Section 6.11 Glossary

Glossary Glossary

loop.
A statement that executes repeatedly while a condition is true or until some condition is satisfied.
infinite loop.
A loop whose condition is always true.
body.
The statements inside the loop.
iteration.
One pass through (execution of) the body of the loop, including the evaluation of the condition.
tab.
A special character, written as \t in C++, that causes the cursor to move to the next tab stop on the current line.
encapsulate.
To divide a large complex program into components (like functions) and isolate the components from each other (for example, by using local variables).
local variable.
A variable that is declared inside a function and that exists only within that function. Local variables cannot be accessed from outside their home function, and do not interfere with any other functions.
generalize.
To replace something unnecessarily specific (like a constant value) with something appropriately general (like a variable or parameter). Generalization makes code more versatile, more likely to be reused, and sometimes even easier to write.
development plan.
A process for developing a program. In this chapter, I demonstrated a style of development based on developing code to do simple, specific things, and then encapsulating and generalizing.

Reading Questions Reading Questions

1.

2.

You have attempted 1 of 3 activities on this page.