14.11. 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.

Before you keep reading...

Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.

You have attempted 1 of 2 activities on this page