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 ?
1392 visits
Outline:Inheritance -Inheritance -subclass আৰু superclassৰ ধাৰনা
Inheritance -Inheritance -subclass আৰু superclassৰ ধাৰনা
Show video info
Pre-requisite