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.
Which of the given figures when placed in the 5th position would continue the series that is established by the first four figures?
Select the figure that can replace the question mark (?) in the following series.
Select the figure from among the given options that can replace the question mark (?) in the following series.
Select the figure from among the given options that can replace the question mark (?) in the following series.
Find the option which is related to the third figure in the same way as the second figure is related to the first figure. (The first figure is the leftm...
Select the figure which will come next in the following figure series.
Select a figure from amongst the Answer Figures which will continue the same series as established by the five Problem Figures.
Problem Figures: ...
Select the figure from among the given options that can replace the question mark (?) in the following series.
Select the figure from among the given options that can replace the question mark (?) in the following series.
AAB, BDD, CIF, DPH, ?