Explain the advantages of inheritance.
Answer / Peer Golden Hansda
1. Code Reusability: Inheritance allows developers to reuse code written for a parent class in child classes, reducing the amount of time and effort required to develop similar functionality for multiple classes.
2. Improved Modularity: By organizing code into base classes and derived classes, inheritance makes it easier to create modular programs that are easier to maintain and debug.
3. Polymorphism: Inheritance enables polymorphism, allowing objects of different classes to be treated as if they were instances of a common superclass.
| Is This Answer Correct ? | 0 Yes | 0 No |
which is platform independent device used in computers
What is Iteration Hierarchy? What is what is Object behavioral concept?
What is encapsulation in oop?
What is the benefit of oop?
What is namespace?
You have one base class virtual function how will call that function from derived class?
Is enum a class?
suppose A is a base class and B is the derved class. Both have a method foo which is defined as a virtual method in the base class. You have a pointer of classs B and you typecast it to A. Now when you call pointer->foo, which method gets called? The next part of the question is, how does the compiler know which method to call?
Program to open a file with First argument
What is abstraction encapsulation?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
What is encapsulation in simple terms?