Course Web Pages

Related Links

Free eBooks


The videos below explain how to define classes with data members and member functions, how to instantiate objects, access data members, call member functions, define and use constructors, specify private and public access levels, define accessors and mutators, and how to define and use constant and static member functions. The examples are taken from Beginning C++ Through Game Programming, by Michael Dawson.

Simple Critter


Constructor Critter


Private Critter


Private Critter with Header File

Static Critter


Critter Caretaker



  1. Improve the Critter Caretaker program so that you can enter an unlisted menu choice that reveals the exact values of the critter's hunger and boredom levels.
  2. Change the Critter Caretaker program so that the critter is more expressive about its needs by hinting at how hungry and bored it is.