OOPortal OOPortal

Logical View  «Prev  Next»

Elements of Class Diagram

Class diagram showing different types of association : 1) Reflexive association, 2) One or more multiplicity, 3) Zero to one multiplicity

Review Your Class Diagrams Frequently While You are Assigning Operations to Classes

Since you are now actively assigning operations to classes, and since it is very easy to make mistakes while drawing sequence diagrams, you should continually cross-check your sequence diagram and your class diagram to make sure that when you assign an operation to a class, you have done it in a way that makes sense. An excellent reference that can help you to make good design decisions is Rebecca Wirfs-Brock's book Object Design: Roles, Responsibilities, and Collaborations .
This book teaches a very useful technique called Responsibility-Driven Design (we describe this technique in a little more detail later in this book).

Static models of a system

Static models of a system describe the structural relationships that hold between the pieces of data manipulated by the system. They describe how data is parcelled out into objects, how those objects are categorized, and what relationships can hold between them. They do not describe the behaviour of the system, nor how the data in a system evolves over time. These aspects are described by various types of dynamic model. The most important kinds of static model are object diagrams and class diagrams. An object diagram provides a 'snapshot' of a system, showing the objects that actually exist at a given moment and the links between them. Many different object diagrams can be drawn for a system, each representing the state of the system at a given instant. An object diagram shows the data that is held by a system at a given moment, This data may be represented as individual objects, as attribute values stored inside these objects, or as links between objects.