You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 5, 2023. It is now read-only.
Base class constructor is called first when using the super keyword.
Dot [.] is the only allowed member axis data member.
Datatype mismatch is allowed in overloading.
Overloading is a way of implementing static polymorphism, whereas overriding is a way of implementing dynamic polymorphism.
super.memfunc resolves the conflict of base class data member and derived class
Reusability
It is possible due to Inheritance. (Inheritance<-->Reusability)
Inheritance
Types:
Single (A->B)
Multiple (Generalisation) ([A,B]->C)
Hierarchial (Specialisation) (A->[B,C])
Multi-level (A->B->C)
class <superclass>{
...
...
}
class <subclass> extends <baseclass>{
... // Adding new function
... //Existing function can be modified.
... //Deletion with access specifier.
}
Extends, super <-- keyword
Example: A->B (A,B has display (disp) functions); when using Inheritance data will be allocated for A in B and the data members are shared.