Continue with your mobile number
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.
Which railway station has achieved the Eat Right Station certification in June 2023?
Which of the following statements is true about Raja Ram Mohan Roy?
What is the purpose of the financial inclusion dashboard 'Antardrishti' launched by RBI Governor Shaktikanta Das?
Which of the following launched the “NIPUN- Bharat” initiative?
The Dutch East India Company established its first factory at which place in 1606?
Who launched PM Kisan AI-Chatbot (Kisan e-Mitra)?
Which new initiative was launched by LIC to empower women in rural areas?
According to Census 2011, what is the Muslim population in Uttarakhand?
Who wrote the autobiography ‘Toward Freedom’?
Who won the gold medal in the men's 10m air pistol event at the ISSF World Cup 2024 in Munich, Germany?