Question
Which of the following is an example of Polymorphism in
Object-Oriented Programming?Solution
Polymorphism allows one interface to represent multiple implementations . This can occur through method overriding , where a subclass provides a specific implementation for a method declared in its parent class, or method overloading , where methods have the same name but different parameters. For instance, an Animal class might have a sound() method overridden in subclasses like Dog or Cat to produce specific sounds. Polymorphism enables flexibility and extensibility, as the same method can be applied differently based on the object. Why Other Options Are Incorrect : 2. A class that inherits properties from another class : This is Inheritance , not Polymorphism. 3. A class that uses another class as a part of its definition : This describes Composition , where objects are combined to form complex systems. 4. A way to restrict access to certain class members : This is Encapsulation , not Polymorphism. 5. A way of dividing a complex system into smaller components : This is closer to the concept of Modularization , unrelated to Polymorphism.
We can say that the business is in profit, when:
Under Ind AS, impairment of an asset requires:
How much percentage of salary is allowed for exemption in House rent allowance Section 10(13A) in case of metro city?
Under Accounting Standard 5 on Net Profit or Loss for the period, prior period items and changes in accounting policies must be disclosed separately. Wh...
What best describes a Bank Guarantee?
Donation given by any person except by Indian company to Political Parties or Electoral Trust is allowed under which section?
There can be variety of budget. Name the budget which relates to a particular function of the business.
How many digits are there in a MMID code used for money transfer through mobile devices?
A budget that changes with the level of activity is a:
According to the capital-asset pricing model (CAPM), a security's required return is equal to the risk-free rate plus a premium. This premium is _____