You get a bonus - 1 coin for daily activity. Now you have 1 coin

3.5. The interrelationship of classes and objects.

Lecture



Relationships between classes and objects

Classes and objects are separate but closely related concepts. In particular, every object is an instance of some class; a class may give rise to any number of objects. In most practical cases classes are static, that is, all their features and content are determined at the time the program is compiled. It follows that any object created belongs to a strictly fixed class. Objects themselves, by contrast, are created and destroyed during the execution of the program.

As an example, consider the classes and objects for the problem of air traffic control. The most important abstractions in this field are aircraft, flight schedules, routes and corridors in airspace. The treatment of these classes of objects is, by their very definition, fairly static. Otherwise it would be impossible to build any application that relies upon such generally understood facts as that aircraft can take off, fly and land, and that no two aircraft must be at the same point at the same time.

The objects of these classes, on the other hand, are dynamic. The set of flight routes changes rather infrequently. The set of aircraft in flight changes considerably faster. The frequency with which aircraft enter and leave air corridors is higher still.

The role of classes and objects in analysis and design

During analysis and the early stages of design two main tasks are addressed:

  • Identifying the classes and objects that make up the vocabulary of the problem domain.
  • Constructing the structures that provide the interaction of objects through which the requirements of the problem are satisfied.

In the first case we speak of the key abstractions of the problem (the collection of classes and objects), in the second of the mechanisms of implementation (the collection of structures).

In the early stages the designer's attention is focused on the external manifestations of the key abstractions and mechanisms. Such an approach creates the logical framework of the system: the structures of classes and objects. In the later phases of the project, including implementation, attention shifts to the internal behavior of the key abstractions and mechanisms, as well as to their physical representation. The decisions taken during design determine the architecture of the system: both the process architecture and the module architecture.

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Object Oriented Analysis and Design"

Terms: Object Oriented Analysis and Design