Answer all the Questions.
It's Urgent...
Q.no.1. How are objects explained in terms of software ?
Q.no.2. Explain 'Inheritance' with suitable example.
Q.no.3. What is Polymorphism ? Explain with an example.
Answers
Answered by
1
Answer 2 : Inheritance allows new objects to take up the properties of already existing objects. Example :
class rectangle // base class
{
}
class rectangle extend triangle // derived class
{
}
Answer 3 : Polymorphism is the ability of an object to assume or become many differnet forms of an object. Example : Function overriding etc.
Don't know about the first though..
class rectangle // base class
{
}
class rectangle extend triangle // derived class
{
}
Answer 3 : Polymorphism is the ability of an object to assume or become many differnet forms of an object. Example : Function overriding etc.
Don't know about the first though..
nitish19:
thank you
Answered by
1
Hey there!
Answer to ur questions are as follows:
Ans. 1
In Computer science, generally an object can be a variable, a data structure, a function, or a method, and as such, is a location in memory having a value and referenced by an identifier.
Ans. 2
Inheritance is the technique for creating new class (derived classes) from the existing classes (base classes). Derived class inherits the some or all feature of base class.
C++ supports the following type of inheritance.
-Single Inheritance
-Multiple Inheritance
-Hierarchical Inheritance
-Multilevel Inheritance
-Hybrid Inheritance
-Multipath Inheritance
Ans. 3
Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms of object.
Example:
Function overloading, function overriding, virtual functions etc.
HOPE IT HELPED ^_^
#EshanSingh1
Answer to ur questions are as follows:
Ans. 1
In Computer science, generally an object can be a variable, a data structure, a function, or a method, and as such, is a location in memory having a value and referenced by an identifier.
Ans. 2
Inheritance is the technique for creating new class (derived classes) from the existing classes (base classes). Derived class inherits the some or all feature of base class.
C++ supports the following type of inheritance.
-Single Inheritance
-Multiple Inheritance
-Hierarchical Inheritance
-Multilevel Inheritance
-Hybrid Inheritance
-Multipath Inheritance
Ans. 3
Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms of object.
Example:
Function overloading, function overriding, virtual functions etc.
HOPE IT HELPED ^_^
#EshanSingh1
Similar questions