By | May 14, 2017

Single level inheritance

This program shows the concept of single level inheritance.Their are two classes in this program one is “scan” and second is “derived”.Derived class has both the class property i.e “scan” as well as its own property.We have created a object “d1” of class ‘derived’ and called the functions of both class using same object “d1”.

Output of single level inheritance

single level inheritance

Leave a Reply

Your email address will not be published. Required fields are marked *