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 process converts cotton fibres into yarn by adding twist?
Retting is a process associated with :
‘Two leaf and a bud’ picking method is applied in
The process of removal of undesirable or non-productive animals from herd is called……………………
Demonstration conducted by research workers in farmers' field is known as:
Relay intercropping is
Which of the following hormones is associated with the reduction of plant growth?
The concentration of CO2 in the soil atmosphere is …………………………………..
...Which of the following crop is biennial in nature?
Hopper burn is a symptom of _____