October 2002
Intermediate to advanced
288 pages
5h 4m
English
A class embodies a set of responsibilities that define the behavior of the objects in the class. The responsibilities are carried out by the operations defined for the class. An operation should do only one thing and it should do it well! For example, a CourseOffering class needs to be able to add a student and remove a student. These responsibilities are represented by two operations—one that knows how to add a student and one that knows how to remove a student. All instances of the class will be able to perform the identified operations of the class.
The structure of an object is described by the attributes of the class. Each attribute is a data definition held by objects of the class. Objects defined for ...