Start learning 50% faster. Sign in now
Polymorphism in OOP is primarily beneficial because it allows objects of different classes to be treated as objects of a common superclass. This enables objects to be used interchangeably, which is useful when designing flexible and reusable code. In OOP, polymorphism is achieved through method overriding (in inheritance) or interfaces, allowing for the same method name to behave differently depending on the object type invoking it. This leads to more generic code, easier maintenance, and greater extensibility. For instance, a superclass Shape could define a method draw() . Subclasses like Circle and Square would each override the draw() method, but polymorphism allows a reference of type Shape to invoke the draw() method of either subclass without needing to know which specific subclass it is dealing with. Why Other Options Are Incorrect:
Find the fourth proportion of 3, 7 and 15.
The ages of A, B and C are in the ratio of 4:2:7 respectively. If the sum of their ages is 52 years, then find the age of B.
Ratio of males to females in village ‘A’ and village ‘B’ is 9:10 and 17:18, respectively and number of females in village ‘B’ is 25% more th...
The value of 'A' is directly proportional to the value of 'B'. When 'A' equals 25, 'B' is 40. Using this relationship, determine the value of 'A' when ...
A sum of money is divided in the ratio of 5 : 12. If the smaller part is 380. Find the larger part.
A total of 504 sweets were distributed among 'P', 'Q', and 'R' in the ratio of 8:7:6, respectively. Additionally, 36 cream rolls ...
Rs 2106 was divided among Anil, Bhanu and Charan in the ratio of 13:10:16 respectively. Find the amount received by Anil and Bhanu together.
In a class of 240 students, 20% decided to leave. From those who stayed, the ratio of boys to girls is 11:13. How many girls are currently in the class?
In a class of 140 students, the number of boys exceeds the number of girls by 8. If 4 additional girls and 6 additional boys join the class, what will b...