The Class Diagram

The integrated UML diagramming tools support the following activities:

  • Creating UML packages
  • Creating classes
  • Drawing generalization (inheritance) links between classes
  • Drawing associations between classes
  • Attaching notes to diagram elements
  • Adding attributes and operations to classes

The class diagram itself is another type of designer surface. You can add new UML elements to the diagram, including associations and notes, using the Tool Palette. You can select UML elements on the diagram and set their properties in the Object Inspector. As you work on the class diagram, Delphi 8 for .NET generates the ECO-enabled source code that implements the model.

Class diagrams are opened from the Model View window. Each UML package you create has its own primary class diagram, and this diagram cannot be deleted (it can be renamed, however). The class diagram nodes are grouped underneath their UML package in the Model View tree. The primary class diagram for a UML package always shows the entire contents of the package; it displays all of the subpackages, classes, and relationships that exist within that package. When you add a new element to a UML package it is automatically represented on the primary class diagram.

You can also create secondary class diagrams within a UML package, if you want to show a subset of the classes within the package. Unlike with the primary class diagram, new elements you add to the package are not automatically added to secondary diagrams. Secondary diagrams can be renamed and deleted as needed.

Any UML elements you add to a primary or secondary class diagram will be contained within the UML package that owns the diagram. To show elements in other UML packages, you must create a shortcut to the element. You can do this through the context menu of the class diagram. Shortcuts are displayed on the diagram with a small arrow icon in their lower left corner. Once a shortcut has been created, you can add associations between it and the classes in the UML package that owns the diagram.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment