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.
A Decree for restitution of conjugal rights can be executed by which of the following modes?Â
What does the Writ of Prohibition, which is used a means to exercise judicial review, mean?
According to section 6 of the Specific Relief Act, 1963, if any person is disposed without his consent of immovable property otherwise then in due cour...
When the mortgaged property is on lease, then______
Special leave to appeal can be granted by the Supreme Court-
Which jurisprudential theory argues that law should reflect the social realities and needs of the society and emphasizes the role of law as a tool for s...
A plaintiff while withdrawing the suit ____________
Which international organization is responsible for the regulation of international trade and settling disputes between member countries?
When are all agreements considered contracts under the provisions of the Contract Act?
As per Evidence Act, When the court regards a fact as proved, unless and until it is disproved, or call for proof of it, this is called