A class is a description of a group of objects with common properties (attributes), common behavior (operations), common relationships to other objects, and common semantics. Thus, a class is a template to create objects. Each object is an instance of some class and objects cannot be instances of more than one class. For example, the CourseOffering class may be defined with the following characteristics:
Attributes—location, time offered
Operations—retrieve location, retrieve time of day, add a student to the offering
Algebra 101, Section 1, and Algebra 101, Section 2 are objects belonging to the CourseOffering class. Each object would have a value for the attributes and access to the operations specified by the CourseOffering ...