SOFTWARE ENGINEERING

SOFTWARE DESIGN

OBJECT ORIENTED DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following are not in composition in “ Car as a system”
A
Car and seat covers
B
car and music system
C
car and colour
D
car and engine
Explanation: 

Detailed explanation-1: -Composition is a way to wrap simple objects or data types into a single unit. Aggregation differs from ordinary composition in that it does not imply ownership. In composition, parent entity owns child entity. In Aggregation, parent Has-A relationship with child entity.

Detailed explanation-2: -For example, A ‘Human’ class is a composition of Heart and lungs. When the human object dies, nobody parts exist. The composition is a restricted form of Aggregation. In Composition, one class includes another class and is dependent on it so that it cannot functionally exist without another class.

Detailed explanation-3: -There are two types of composition: association and aggregation. Both types of composition include a has-a relationship. However, there are differences between associations and aggregations based on how you visualize the composed objects of the whole object.

There is 1 question to complete.