Prev | Current Page 323 | Next

Tim Weilkiens

"Systems Engineering with SysML/UML: Modeling, Analysis, Design"

A composite structure diagram describes the internal
structure of classes on role level. UML is a very extensive language already, so
that you may ask, ??? Why do we need yet another diagram form? ???
To answer this question, let ??™ s look at the class diagram in Figure 3.24 . It is a
simplifi ed representation of things a car is composed of. The car consists of an
engine that drives two wheels. In total, the car has four wheels??”two front wheels
and two rear wheels.
All of this looks pretty logical at fi rst sight. But take a closer look at the section
of the object model shown in Figure 3.25 , which can result from this class
diagram. The engine in the Opel Astra doesn ??™ t only drive the front right wheel,
FIGURE 3-25
Undesirable object model ???car??? (section).
class Object model Car (section)
frontright:Wheel
opelAstra:Car turbo:Engine rearright:Wheel
ferrari:Car
FIGURE 3-24
Simple class model for a car.
class Car
0..1
m 1
0..1 2 axle
2
0..1
0..1
2
front rear
Engine Wheel
Car
165
but also the rear right wheel, but the latter is a wheel of a Ferrari.


Pages:
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335