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

Program to print a series, Write a program called Series that will print/di...

Write a program called Series that will print/display a series of numbers starting with 1 and ending with the last number that is less than 30. The series should include only odd n

C++, write a C++ program that performs the following tasks 1. prompts the u...

write a C++ program that performs the following tasks 1. prompts the user to enter two numbers 2. displays the divisors of each number and store the divisors of number 1 in A and t

For loop, minimum of seven number

minimum of seven number

String-classes-constructors and member functions, Objective Using C++ s...

Objective Using C++ string, classes, constructors and member functions. Task A Write a program (book.cpp) to store a list of book titles and the published dates. Your pro

Priority Queue, Ask question #Minimum 100 words acceptedEducational Objecti...

Ask question #Minimum 100 words acceptedEducational Objectives: After completing this assignment, the student should be able to accomplish the following: Apply generic algorithms i

Programming, pseudocode for gregorian calendar

pseudocode for gregorian calendar

Can you think of a condition where your program would crash , Can you think...

Can you think of a condition where your program would crash without attaining the breakpoint that you set at the starting of main()? A: C++ let for dynamic initialization of glo

Explain pure virtual functions, Pure Virtual Functions An abstract clas...

Pure Virtual Functions An abstract class is one, which is used just for deriving some other classes. No object of this class is declared and used in the program. Likewise, ther

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