Skip to main content

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

Section 14.11 Glossary

Glossary Glossary

class:.
In general use, a class is a user-defined type with member functions. In C++, a class is a structure with private instance variables.
accessor function:.
A function that provides access (read or write) to a private instance variable.
invariant:.
A condition, usually pertaining to an object, that should be true at all times in client code, and that should be maintained by all member functions.
precondition:.
A condition that is assumed to be true at the beginning of a function. If the precondition is not true, the function may not work. It is often a good idea for functions to check their preconditions, if possible.
postcondition:.
A condition that is true at the end of a function.

Reading Questions Reading Questions

1.

You have attempted 1 of 2 activities on this page.