{"id":108,"date":"2011-07-08T22:08:30","date_gmt":"2011-07-08T16:08:30","guid":{"rendered":"http:\/\/ujjalruet.wordpress.com\/?p=108"},"modified":"2011-07-08T22:08:30","modified_gmt":"2011-07-08T16:08:30","slug":"inheritance-in-oop","status":"publish","type":"post","link":"https:\/\/blog.ujjal.net\/?p=108","title":{"rendered":"Inheritance in OOP"},"content":{"rendered":"<p>\u0986\u099c\u09be\u0987\u09b0\u09be \u09a5\u09be\u0995\u09a4\u09c7 \u09a5\u09be\u0995\u09a4\u09c7 \u09b9\u099f\u09be\u09a4\u09cd\u200c \u09ae\u09a8\u09c7 \u09b9\u0987\u09b2 \u0985\u09a8\u09c7\u0995 \u09a6\u09bf\u09a8 \u09aa\u09cd\u09af\u09be\u09a8\u09b0 \u09aa\u09cd\u09af\u09be\u09a8\u09b0 \u0995\u09b0\u09be \u09b9\u09df\u0964 \u09a4\u09be\u0987 \u099a\u09b2\u09c7 \u0986\u09b8\u09b2\u09be\u09ae \u0986\u09ac\u09be\u09b0 \u0986\u09ae\u09be\u09b0 \u09a6\u09c1\u09a8\u09bf\u09df\u09be\u09df\u0964 \u0986\u099c\u0995\u09c7 \u0986\u09ae\u09bf OOP \u098f\u09b0 Inheritance \u09a8\u09bf\u09df\u09be \u0995\u09bf\u099b\u09c1 \u0995\u09a5\u09be \u09ac\u09b2\u09ac\u0964 \u09aa\u09c1\u09b0\u09be\u099f\u09be\u0987 \u09ac\u09be\u0982\u09b2\u09be\u09df \u09b2\u09bf\u0996\u09a4\u09c7 \u09aa\u09be\u09b0\u09a4\u09be\u09ae,\u0995\u09bf\u09a8\u09cd\u09a4\u09c1 \u0995\u09a4\u09bf\u09aa\u09df STUDENT \u09a6\u09c7\u09b0 \u0986\u09ac\u09be\u09b0 exam \u098f \u09ac\u09be\u0982\u09b2\u09be \u09b2\u09c7\u0996\u09a4\u09c7 \u09aa\u09be\u09b0\u09ac\u09c7 \u09a8\u09be \u09ac\u09b2\u09c7 tutorial \u099f\u09be \u0987\u0982\u09b0\u09c7\u099c\u09bf\u09a4\u09c7 \u09a6\u09bf\u09df\u09be \u09a6\u09bf\u09b2\u09be\u09ae\u0964<br \/>\n\u098f\u0996\u09a8 \u0986\u09b8\u09bf \u0986\u09b8\u09b2 \u0995\u09a5\u09be\u09df&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;\u0964<\/p>\n<p><strong>Base-Class Access Control<\/strong><br \/>\nWhen a class inherits another,the members of the base class become members of the derived class.<br \/>\nClass inherits uses the general form:<br \/>\n[code]<br \/>\nclass derived-class:access base-class{<br \/>\n\/\/body of class<br \/>\n};<br \/>\n[\/code]<\/p>\n<p>The access status of the base class&#8217;s members inside the derived class is determined by the <strong>access<\/strong>.<br \/>\nThere are three types of access specifier.They are <strong>public,private and protected<\/strong>. If no access specifier is present, the access specifier is by default <strong>private<\/strong>.<\/p>\n<p>When the access specifier for a base class is <strong>public<\/strong>, all public members of the base class become public members of the derived class and all protected members of the base become protected members of the derived class. <\/p>\n<p><strong>In all cases,the base&#8217;s private members remain private for the derived class and are not accessible by members of derived class.<\/strong><\/p>\n<p>When the access specifier for a base class is private, all public and protected members of the base class become private members of the derived class.<\/p>\n<p>When the access specifier for a base class is protected, all public and protected members of the base class become protected members of the derived class.<\/p>\n<p>See example from your text books for the better conception. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0986\u099c\u09be\u0987\u09b0\u09be \u09a5\u09be\u0995\u09a4\u09c7 \u09a5\u09be\u0995\u09a4\u09c7 \u09b9\u099f\u09be\u09a4\u09cd\u200c \u09ae\u09a8\u09c7 \u09b9\u0987\u09b2 \u0985\u09a8\u09c7\u0995 \u09a6\u09bf\u09a8 \u09aa\u09cd\u09af\u09be\u09a8\u09b0 \u09aa\u09cd\u09af\u09be\u09a8\u09b0 \u0995\u09b0\u09be \u09b9\u09df\u0964 \u09a4\u09be\u0987 \u099a\u09b2\u09c7 \u0986\u09b8\u09b2\u09be\u09ae \u0986\u09ac\u09be\u09b0 \u0986\u09ae\u09be\u09b0 \u09a6\u09c1\u09a8\u09bf\u09df\u09be\u09df\u0964 \u0986\u099c\u0995\u09c7 \u0986\u09ae\u09bf OOP \u098f\u09b0 Inheritance \u09a8\u09bf\u09df\u09be \u0995\u09bf\u099b\u09c1 \u0995\u09a5\u09be \u09ac\u09b2\u09ac\u0964 \u09aa\u09c1\u09b0\u09be\u099f\u09be\u0987 \u09ac\u09be\u0982\u09b2\u09be\u09df \u09b2\u09bf\u0996\u09a4\u09c7 \u09aa\u09be\u09b0\u09a4\u09be\u09ae,\u0995\u09bf\u09a8\u09cd\u09a4\u09c1 \u0995\u09a4\u09bf\u09aa\u09df STUDENT \u09a6\u09c7\u09b0 \u0986\u09ac\u09be\u09b0 exam \u098f \u09ac\u09be\u0982\u09b2\u09be \u09b2\u09c7\u0996\u09a4\u09c7 \u09aa\u09be\u09b0\u09ac\u09c7 \u09a8\u09be \u09ac\u09b2\u09c7 tutorial \u099f\u09be \u0987\u0982\u09b0\u09c7\u099c\u09bf\u09a4\u09c7 \u09a6\u09bf\u09df\u09be \u09a6\u09bf\u09b2\u09be\u09ae\u0964 \u098f\u0996\u09a8 \u0986\u09b8\u09bf \u0986\u09b8\u09b2 \u0995\u09a5\u09be\u09df&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;\u0964 Base-Class Access Control When &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.ujjal.net\/?p=108\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Inheritance in OOP&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-108","post","type-post","status-publish","format-standard","hentry","category-programming-with-c-2"],"_links":{"self":[{"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=108"}],"version-history":[{"count":0,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=\/wp\/v2\/posts\/108\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}