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.
Match List-1 (Person) with List-II (Organization) and select the correct answer using the code given below the lists:
List-I (Person)
With reference to casual workers employed in India, which of the following statements is/are correct?
I. All casual workers...
The provisions related to retrenchment are covered under which Act?
Find the median of 2, 3, 6, 8, 6, 9, 14, 5 and 14.
What is the minimum rate of compensation for permanent total disability under the Workmen’s Compensation Act, after the amendment made in 1995?
Two vehicles which are 100 km apart are running towards each other in a straight line. In how much time will they meet each other provided they follow ...
A and B started a business by investing Rs.7000 and Rs.12000 respectively. After 4 months A withdrew 50% of his investment. If at the end of the year, p...
By which of the following can petrol fire be extinguished ?
A scored 30% marks and failed by 40 marks whereas B scored 60% marks, which was 80 more than the passing marks of the examination. Find the total marks ...
What is the maximum amount of gratuity that can be paid under the Payment the Gratuity Act 2018 (Amendment)?