What is Composite Structure Diagram

Categories:

Recommended

What is Composite Structure Diagram?

7-9 minutes

Composite Structure Diagram is one of the new artifacts added to UML 2.0. A composite structure diagram is a UML structural diagram that contains classes, interfaces, packages, and their relationships, and that provides a logical view of all, or part of a software system. It shows the internal structure (including parts and connectors) of a structured classifier or collaboration.

A composite structure diagram performs a similar role to a class diagram, but allows you to go into further detail in describing the internal structure of multiple classes and showing the interactions between them. You can graphically represent inner classes and parts and show associations both between and within classes.

Are you looking for a Free UML tool for learning UML faster, easier and quicker? Visual Paradigm Community Edition is a UML software that supports all UML diagram types. It is an international award-winning UML modeler, and yet it is easy-to-use, intuitive &completely free.

Free Download

Purpose of Composite Structure Diagram

  • Composite Structure Diagrams allow the users to “Peek Inside” an object to see exactly what it is composed of.
  • The internal actions of a class, including the relationships of nested classes, can be detailed.
  • Objects are shown to be defined as a composition of other classified objects.

Composite Structure Diagram at a Glance

  • Composite Structure Diagrams show the internal parts of a class.
  • Parts are named: part Name: part Type[multiplicity]
  • Aggregated classes are parts of a class but parts are not necessarily classes, a part is any element that is used to make up the containing class.

Deriving Composite Structure Diagram from Class Diagram

Online Store

Suppose we are modeling a system for an online store. The client has told us that customers may join a membership program which will provide them with special offers and discounted shipping, so we have extended the customer object to provide a member and standard option.

Let’s modeling the online store using a class diagram

We have a class for Item which may be aggregated by the Order class, which is composed by the Customer class which itself is composed by the Store Manager class. We have a lot of objects that end up within other objects.

Everything looks like it ends up inside Store Manager , so we can create a composite structure diagram to really see what it’s made of.

In the example above, we can see:

  • Store Manager from its own perspective, instead of the system as a whole.
  • Store Manager directly contains two types of objects ( Customer and Item ) as is indicated by the two composition arrows on the class diagram.
  • The composite structure diagram here shows more explicitly is the inclusion of the subtypes of Customer.
  • Notice that the type of both of these parts is Customer, as the store sees both as Customer objects.
  • We also see a connector which shows the relation between Item and Order. Order is not directly contained within the Store Manager class but we can show relations to parts nested within the objects it aggregates.
Category:

VP Flipbook Maker

This flipbook was powered by Visual Paradigm Online. You can create one as well by upload your own PDF documents. Try out this online flipbook maker for free now!