An object counter
For example, you might need to
- Keep track of the number of objects that are instantiated from a
particular class,
- Such as the total number of enemy objects in a game program
You would probably write the code to do the counting into the constructor.