You are on page 1of 7

UNIFIED MODELING LANGUAGE (UML)

Composition

Dr.Yi Mon Thet

Faculty of Information Science


University of Computer Studies, Yangon
Outlines
 Data Types  Aggregation
 Classes  Composition
 Describing Objects With Classes  Association Classes
 Associations  N-array Associations
 Generalization And Specialization  Qualified Associations
 Inheritance Of Attributes And  Interfaces
Operations  Templates
Composition
 A strong form of aggregation
 The ‘part’ objects are dependent on the ‘whole’ objects in two ways
i. a ‘part’ object can only belong to one composite at a time and,
ii. when a composite object is destroyed, all its dependent parts must be
destroyed at the same time

Figure 8.36 The Use of Composition


Composite Object
 Basic notion of composition is not strong enough to enforce certain natural
properties of composite objects

Figure 8.37: The structure of a computer


Composite Object (Cont’d)

Figure 8.38: The computer as a composite object


Composite Object (Cont’d)

Figure 8.39: Connecting computers together


Next Lecture
Thank You.

Association Classes

Course Introduction

You might also like