what is the basic concept of inheritance?
Answers were Sorted based on User's Feedback
Answer / ashwini bhusari
the concept behind the inheritance is that we can create a
object of another class and getting all the characteristics
of the base class.the class who get characteristic is
called derived class because it is deriving from the base
class.the class from which class is derived is called base
class.so, we can create another class from the existing
one.this is the greatest advantage.
| Is This Answer Correct ? | 16 Yes | 3 No |
Inheritance refers to, the object of one class acquires
the properties of object of another class.
Ex: 'robbin' belongs to the catagiry 'flying bird' but it
also belongs to the catagiry of 'bird'.
Thus it refers to,each derived class shares comman
characteristics with the class from which it is derived.
| Is This Answer Correct ? | 15 Yes | 3 No |
Answer / prashant
Inheritance is a concept where an object of one class
acquires the properties of another class.
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / walking legend
let us consider a real life example:
in a family we know that some of the parental
charecterstics gets to the new generstion.Similarly,in an
object oriented programming inheritance ia concept of
aquiring the members of the main base class to the derived
class.
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / prasad salpekar
Inheritance basically refers to the characterstics of
a new class which is been aquired by an existing class
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / kalaiselvan
if one class acquires properties of another class is
called inheritance.
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / siva
if one class(called derived) acquires/inherits properties
of another class(base class) is called inheritance.
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / anshu sharma
Hierarchy is used to define more specialized classes based
on a preexisting generalized
class.Example we have VEHICLE class and we can inherit this
class make more specialized
class like CAR, which will add new attributes and use some
existing qualities of the
parent class.Its shows more of a parent-child relationship
.This kind of hierarchy is called
inheritance
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / nitish
Inheritance basically stands to inherit the +ve functions of
predecessor.
Earlier its the main base class to give birth to the further
derived class.
This derived class have the features from in its functioning
from the base class from which it have been derived.
| Is This Answer Correct ? | 1 Yes | 3 No |
What is the difference between static polymorphism and dynamic polymorphism?
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; wow *b; a.x = 22; b = &a; a.x = 23; cout << b->x; return 0; }
what are the uses of C++
What are classes oop?
Plese get me a perfect C++ program for railway/airway reservation with all details.
write a program to find 2^n+1 ?
How to deploy web appliction in web logic ?
Example for 4 pillar of oops like, Inheritance,Poly,Abstraction,Encabsulation ?
What are generic functions and generic classes?
write a program in c++ to overload the function add (s1,s2) where s1 and s2 are integers and floating point values.
When is a memory allocated to a class?
What is difference between #define and const?