3.4. Classes

A class is an abstraction describing the common features of all objects in a group of similar objects. For example, a class called Student could be created to describe all Student objects recognized by the SRS.

A class defines the following:

  • The data structure (names and types of fields) needed to define an object belonging to that class

  • The operations to be performed by such objects: specifically, what these operations are, how an object belonging to that class is formally called upon to perform them, and what "behind the scenes" things an object has to do to actually carry them out

For example, the Student class might be defined to have the nine fields described in Table 3-1.

Table 3.1. Proposed Fields of the Student Class
Field ...

Get Beginning C# 2008 Objects: From Concept to Code now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.