previous | start | next

Summary: Creating Classes of type I and II

Classes of type I and II both define types which can be used to declare variables and to create instances of the type.

The steps to creating such a class typically consist of defining at least the following members of the class:

  1. Add private instance data members
  2. Add public constructor(s)
  3. Add public instance methods

The public instance methods can access the non static data members.

A class can also have static data members and static methods, but static methods can only access static data members of the class, not the instance data members.



previous | start | next