What is inheritance, C/C++ Programming

Assignment Help:

What is inheritance?

Class, the vehicle, which is used to execute object-oriented concepts in C++, has given a new dimension to this idea of reusability. Many vendors now offer libraries of classes. A class library having of data and methods to operate on that data, encapsulated in a class. The source code of these libraries require not be available to modify them. The new dimension of OOP uses a method called inheritance to modify a class to suit one's requirements.  Inheritance means deriving new classes from the old ones. The old class is called the base class or parent class or super class and the class which is derived from this base class is known as derived class or child class or sub class. Deriving a new class from an existing one, permits redefining a member function of the base class and also adding new members to the derived class and this is possible without having the source of the course explanation also.  In other words, a derived class not only inherits all properties of the base class but also has some refinements of its own. The base class remains unchanged in the process. In other words, the derived class "is a "type of base class, but with more details added. For this reason, the relationship among a derived class and its base class is called an "is-a" relationship.

 


Related Discussions:- What is inheritance

Advanced input - output routines, Although we can handle most I/O routines ...

Although we can handle most I/O routines with getc and putc , there are file versions of fgets, fputs, fprintf and fscanf . The syntax is       fgets(stringname,n,filename);   Th

Program to create a query from database, Implement (a part of) electronic e...

Implement (a part of) electronic election Scenario where following political parties are participating in election: PPP, PML and PTI.  Create a class PollingStation where it stor

Derived data type, Derived Data Type: Array is derived data type to sto...

Derived Data Type: Array is derived data type to store large collection of data of only one data type. int mark[100]; char names[25]; Function: will be discussed early

Padovan string, padovan string program 1 : package test.padovanstring; ...

padovan string program 1 : package test.padovanstring; public class PadovanString {     public int stringOccurrences(int n, String str){        if(n >= 40)     return -

Program with inbuilt functions, write a atm program in c with inbuilt funct...

write a atm program in c with inbuilt functions for 1782?

C program for palindrome, C Program for Palindrome Norm...

C Program for Palindrome Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Add words in dictionary - c++ program, Add words in Dictionary: void D...

Add words in Dictionary: void Dictionary::add( Object& objectToAdd ) {     if( !objectToAdd.isAssociation() )         ClassLib_error( __ENOTASSOC );     else

Super ASCII stringchecker, In the Byteland country a string "s" is said to ...

In the Byteland country a string "s" is said to super ascii string if and only if count of each charecter in the string is equal to its ascci value in the byteland country ascii co

Common c control flow instructions, In this Lab you will code 8086 assemble...

In this Lab you will code 8086 assembler equivalents (Virgo) for common C control flow instructions. This will give you an appreciation for how control flow is implemented in assem

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd