Create a class Shape. Create two functions of the class as Area and Perimeter. Find the area and perimeter of various shapes like square, rectangle and circle.
Can we use private members of base class which is stored in public member of same class in the derived class as you done in this tutorial using sub1,sub2,sub3 which is stored in public member total and then access this total in derived class?Cann't we use here access specifier protected?
Inheritance what ?
16591 visits
Outline:Inheritance -Inheritance -Concept of subclass and superclass -Types of inheritance -single level inheritance -Multilevel inheritance
Inheritance -Inheritance -Concept of subclass and superclass -Types of inheritance -single level inheritance -Multilevel inheritance
Show video info
Pre-requisite