Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/default-filters.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/default-filters.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/class-wp-theme.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/class-wp-theme.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/class-wp-styles.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/class-wp-styles.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/rest-api/class-wp-rest-request.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/rest-api/class-wp-rest-request.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/block-supports/duotone.php on line 1

Warning: Uninitialized string offset 0 in /home/ujjal/public_html/blog/wp-includes/block-supports/duotone.php on line 1

Warning: Cannot modify header information - headers already sent by (output started at /home/ujjal/public_html/blog/wp-includes/default-filters.php:1) in /home/ujjal/public_html/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/ujjal/public_html/blog/wp-includes/default-filters.php:1) in /home/ujjal/public_html/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/ujjal/public_html/blog/wp-includes/default-filters.php:1) in /home/ujjal/public_html/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/ujjal/public_html/blog/wp-includes/default-filters.php:1) in /home/ujjal/public_html/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/ujjal/public_html/blog/wp-includes/default-filters.php:1) in /home/ujjal/public_html/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/ujjal/public_html/blog/wp-includes/default-filters.php:1) in /home/ujjal/public_html/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/ujjal/public_html/blog/wp-includes/default-filters.php:1) in /home/ujjal/public_html/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/ujjal/public_html/blog/wp-includes/default-filters.php:1) in /home/ujjal/public_html/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1768
{"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":"

\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
\n\u098f\u0996\u09a8 \u0986\u09b8\u09bf \u0986\u09b8\u09b2 \u0995\u09a5\u09be\u09df…………………\u0964<\/p>\n

Base-Class Access Control<\/strong>
\nWhen a class inherits another,the members of the base class become members of the derived class.
\nClass inherits uses the general form:
\n[code]
\nclass derived-class:access base-class{
\n\/\/body of class
\n};
\n[\/code]<\/p>\n

The access status of the base class’s members inside the derived class is determined by the access<\/strong>.
\nThere are three types of access specifier.They are public,private and protected<\/strong>. If no access specifier is present, the access specifier is by default private<\/strong>.<\/p>\n

When the access specifier for a base class is 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

In all cases,the base’s private members remain private for the derived class and are not accessible by members of derived class.<\/strong><\/p>\n

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

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

See example from your text books for the better conception. <\/p>\n","protected":false},"excerpt":{"rendered":"

\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…………………\u0964 Base-Class Access Control When … <\/p>\n