01.01.2015 Views

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SESSION<br />

9<br />

Modeling the Static View:<br />

The Class Diagram<br />

Session Checklist<br />

✔ Explaining the two diagrams in the Object Model<br />

✔ Explaining and illustrating the Class diagram notation<br />

✔ Explaining and illustrating attribute specifications<br />

✔ Explaining and illustrating operation specifications<br />

✔ Explaining and illustrating the different ways to represent a class<br />

The Class diagram is by far the most used and best known of the object-oriented diagrams.<br />

It is the source for generating code and the target for reverse engineering code.<br />

Because the Class diagram is the primary source for code generation, the other diagrams<br />

tend to serve as tools of discovery that add to your knowledge about how to build the<br />

Class diagram. Use Cases identify the need for the objects as resources used by the system to<br />

achieve its goals. The Sequence and Collaboration diagrams are excellent tools for discovering<br />

object interactions and, by inference, defining interfaces. The Activity diagram is very<br />

good for discovering the behavior implemented by objects and so helps to define the logic of<br />

operations on the objects.<br />

The Object Model<br />

The phrase object model has been the source of some confusion. Object Model is often used<br />

as a synonym for Class diagram. In this book, object model is used to mean the set of diagrams<br />

used to model objects, namely the Class and Object diagrams. The Class diagram is the<br />

more recognized and used of the two diagrams. The Object diagram is often implemented<br />

within the Class diagram, not as a separate diagram. In fact, the <strong>UML</strong> specification does not<br />

actually define the Object diagram. It is simply a Class diagram that contains only objects.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!