Question
In OOP, which concept allows a subclass to provide a
specific implementation of a method already defined in its parent class?Solution
Method overriding allows a subclass to redefine a method of its parent class to provide more specific behavior. 1. Dynamic Binding: Overriding enables dynamic (runtime) polymorphism, allowing a subclass method to be invoked via a parent class reference. 2. Specialization: It customizes inherited behavior, making objects more precise in functionality. For example, a generic draw() method in a Shape class can be overridden by a Circle subclass to draw circles. 3. Liskov Substitution Principle: Overriding ensures subclass objects can seamlessly replace parent class objects without affecting system behavior. Option C exemplifies OOP’s adaptability and extendability by redefining methods at runtime. Why Other Options Are Incorrect: • A) Encapsulation: Manages data access, unrelated to redefining methods. • B) Method Overloading: Involves multiple methods with the same name but different parameters, unrelated to inheritance. • D) Abstraction: Focuses on defining essential features, unrelated to runtime behavior customization. • E) Composition: Relates to object containment, not method redefinition.
- Which architecture is used in modern NLP tasks like BERT and GPT? 
- What is cohesion in software engineering? 
- Spark performs better than Hadoop MapReduce because: 
- Consider the following statement regarding DIAC. - Statement (1): DIAC is unidirectional device. - Statement (2): DIAC can be used for trigger... 
- Which of the following statements best describes a mesh topology in network design? 
- Which of the following algorithm uses Darwinian based algorithm to find the best solutions to solve complicated problems with a greater number of variab... 
- Which of the following statements best describes the concept of a computing model in computer science? 
- The is attribute in custom elements is used for: 
- ._______ method can be used for any SQL statements(Select and Update both). 
- Which statement is FALSE about open loop system?