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:
Two partners, 'P' and 'Q,' invested in a business with initial amounts of Rs. 4,800 and Rs. 7,200, respectively. 'P' maintained the investment for 15 mo...
If the ratio of time periods of investment of A and B is 4:5, profit at the end of the year is Rs.120000 and A’s share in it is Rs.30000, then what is...
A and B started a business. After 3 years they received Rs 1245 as profit in which A's share is Rs 720, then find the ratio of investment of A and B.
‘Ravi’ and ‘Sameer’ invested Rs. ‘y’ and Rs. ‘1.5y’ in a business respectively. After four months, both of them increased their investme...
‘A’ and ‘B’ entered into a partnership by investing Rs. 2500 and Rs. 3500, respectively. If ‘A’ invested his sum for only 7 months and the t...
"Karan" and "Arjun" launched a business, with "Karan" contributing 25% more capital than "Arjun." 8 months later, 'Arjun' pulled out of the investment. ...
A, B and C invest in a partnership in the ratio 4:3:6 and investment of A is Rs.200 less than investment of C. Partner B invests for 1/5th and A and C i...
A and B started a retail store with initial investments in the ratio 6:7 and their annual profits were in the ratio 4:5. If A invested the money for 7 m...
Raj invested Rs.42000 in a business. After 4 months, Rohan joins him with an investment of Rs.P. If at the end of the year the profit is Rs.58000 and pr...
Palash invest thrice the sum invested by Vicky and withdraws half of the sum after 3 months and again withdraws half of the remaining sum after 5 months...