Free Programming E-Books
Free download ebooks on computer and programming

Free Ebook Computer Programming

Free Ebook Computer Programming :
Introduction to C and C++ Programming.pdf
Publisher :
Unknown
Pages :235
Format :pdf
Size :1.2 MB
Upload date :12-07-05

Table of content

Coming soon

Other HOT and Free ebooks!!

Coming Soon

Inheritance and Virtual Methods in C++, deals with more advanced OOP methodology

Free Ebook on C++ Programming : Introduction to C and C++ Programming.pdf

Inheritance and Virtual Methods in C++

Inheritance, like encapsulation, is central to the development of objectoriented programs. The major point of using object inheritance is to support code reusability: it allows you to reuse code from a previous project, but gives you the flexibility to slightly modify it if the old code does not do exactly what you need for the new project. It makes little sense to start every new project from scratch, since some code (especially that dealing with the interface) will certainly be repeated in several programs and you should strive to build on what you did previously.

Moreover, it is easy to make an error if we try to modify the original class, but we are less likely to make an error if we leave the original alone and only add to it. Another reason for using inheritance is if the project requires the use of several classes which are very similar but slightly different.

In this Module we will focus on the mechanism of inheritance and how to build it into a program. A better illustration of why you would use inheritance will be given later where we will discuss some practical applications of object-oriented programming..............more

Download free ebook : Deakin_University--Introduction_to_C_and_C++_Programming.pdf
Free ebook download on C++ Programming

The principle of inheritance is available with several modern programming languages and is handled slightly differently by each. C++ allows you to inherit all or part of the members and methods of a class, modify some, and add new ones not available in the parent class. You have complete flexibility, and as usual, the method used with C++ has been selected to result in the most efficient code execution.

Top