Start learning 50% faster. Sign in now
Composition is a "has-a" relationship where one object contains another, and the contained object cannot exist independently of the parent. 1. Dependency: For instance, an engine is part of a car and cannot function independently outside of it. 2. Tight Coupling: The lifecycle of the child object depends entirely on the parent object. If the parent is destroyed, the child is destroyed too. 3. Reusability: Composition fosters code reuse by enabling modular design without strict inheritance hierarchies. Option A exemplifies composition through its strong containment relationship, central to creating complex, interdependent systems. Why Other Options Are Incorrect: • B) Aggregation: Denotes a weaker "has-a" relationship, where components can exist independently. • C) Inheritance: Refers to property sharing, not containment. • D) Polymorphism: Focuses on method behavior variability. • E) Association: A general relationship without specific containment rules.
Statements:
Only Sun are Moon.
Only few Sun are Star.
All Star are Gas.
Conclusion:
I. Some Gas are Moon.
...Statements:
All spoons are forks.
All plates are forks.
All forks are bowls.
Conclusions:
I. All spoons are not ...
Statements:
Some kitchen is balcony.
All balcony is room.
No room is floor.
Conclusions:
...
Statement : Some towers are pillars.
Some pillars are buildings.
All buildings a...
Conclusions:
I. All Drivers can be Conductors.
II. Some Tractors are Cars.
III. Few Cars are not Tram.
Statements:
Statements-
1. All phones are wires.
2. All switches are wires.
3. Some wires are poles.
4. Some poles are not phones.
<...Statements: Onion % Brinjals Brinjals # Tomato Cauliflower & Cucumber Tomato @ Cauliflower
Conclusion:
I. Cauliflower $ Brinjals
II...
Statements: All books are notebooks.
Some notebooks are novels.
Statements:
Some doors are windows.
All windows are beds.
Some beds are pillows.
All pillows are blankets.
Statements:Some villages are towns.
Some towns are huts.
All huts are rivers.
Some rivers are tents.
Conclusions:I. Some te...