Question
Which of the following best illustrates the concept of
polymorphism in Object-Oriented Programming (OOP)?Solution
Polymorphism in OOP refers to the ability of a function, method, or object to take on multiple forms. This characteristic allows developers to design interfaces or methods that can perform different tasks based on context. 1. Method Overloading: One of the primary examples of polymorphism is method overloading, where multiple methods share the same name but differ in argument types or counts. 2. Dynamic Behavior: Polymorphism also enables dynamic method invocation at runtime, allowing a subclass to provide a specific implementation for a method defined in its superclass. 3. Extensibility: By allowing objects to process different behaviors through a unified interface, polymorphism enhances code flexibility and scalability. Why Other Options Are Incorrect: • B) A class inheriting properties: This describes inheritance, not polymorphism. • C) Combining multiple objects: This relates to composition, which involves creating a complex object from simpler ones. • D) Restricting access: This refers to encapsulation, which controls data accessibility within a class. • E) Relationships between objects: This describes association or aggregation, not polymorphism.
Recoveries of loans and advances, borrowings, are an example of ________.
What is the process in which a thick oxide layer of aluminium is developed over the aluminium articles that is dyed to give an attractive finish?
How many hectares of forest area did India gain annually from 2010 to 2020 according to the FAO report?
Mopin Festival is famous in which state?
In the east and central India, the Mauryas were succeeded by whom?
I. The Sungas
II. The Kanvas
Report on Global Remittances is published by which of the following global financial agency?
Who wrote ‘Why I am an Atheist’?
Name the type of nutrition in which the organism takes in nutrients in solution form from dead and decaying matter.
The Institute of Chartered Accountants of India set up by an act of parliament to regulate the profession of Chartered Accountants in India in the year_...
Provisions of the Consumer Protection Act, 2019 has come into force since ______.