{"id":72,"date":"2011-04-15T01:50:24","date_gmt":"2011-04-14T19:50:24","guid":{"rendered":"http:\/\/ujjalruet.wordpress.com\/?p=72"},"modified":"2011-04-15T01:50:24","modified_gmt":"2011-04-14T19:50:24","slug":"object-oriented-programming","status":"publish","type":"post","link":"https:\/\/blog.ujjal.net\/?p=72","title":{"rendered":"Object Oriented programming"},"content":{"rendered":"<p>\u0986\u09ae\u09b0\u09be \u099c\u09c0\u09ac\u099c\u0997\u09a4\u09c7\u09b0 \u09b6\u09cd\u09b0\u09c7\u09a3\u09c0\u09ac\u09bf\u09a8\u09cd\u09af\u09be\u09b8 \u099c\u09be\u09a8\u09bf\u0964 \u09af\u09c7\u09ae\u09a8 : \u09ae\u09be\u09a8\u09c1\u09b7\u09c7\u09b0 \u09ac\u09c8\u099c\u09cd\u099e\u09be\u09a8\u09bf\u0995 \u09a8\u09be\u09ae <em>Homo sapiens<\/em> \u0964 <em>Mammalia<\/em> \u09ac\u09be \u09b8\u09cd\u09a4\u09a8\u09cd\u09a8\u09aa\u09be\u09df\u09c0 \u09b6\u09cd\u09b0\u09c7\u09a3\u09c0\u09b0 \u098f\u0995\u099f\u09bf \u09aa\u09cd\u09b0\u09be\u09a3\u09c0 \u09ae\u09be\u09a8\u09c1\u09b7\u0964 \u098f \u09b6\u09cd\u09b0\u09c7\u09a3\u09c0\u09a4\u09c7 \u09b0\u09df\u09c7\u099b\u09c7 \u09ac\u09be\u09a8\u09b0 \u0993 \u09b6\u09bf\u09ae\u09aa\u09be\u09a8\u09cd\u099c\u09c0 \u09b8\u09b9 \u0986\u09b0\u0993 \u0985\u09a8\u09c7\u0995\u0964 \u09a4\u09be\u09b9\u09b2\u09c7,Mammalia class \u099f\u09bf\u09b0 \u09b8\u0995\u09b2 \u09ac\u09c8\u09b6\u09bf\u09b7\u09cd\u099f\u09cd\u09af \u09ae\u09be\u09a8\u09c1\u09b7,\u09ac\u09be\u09a8\u09b0 \u0993 \u09b6\u09bf\u09ae\u09aa\u09be\u09a8\u09cd\u099c\u09c0\u09b0 \u09b0\u09df\u09c7\u099b\u09c7\u0964 \u0985\u09b0\u09cd\u09a5\u09be\u09ce Mammalia Class \u098f\u09b0 Object \u09b9\u09b2 \u09ae\u09be\u09a8\u09c1\u09b7\/\u09ac\u09be\u09a8\u09b0\/\u09b6\u09bf\u09ae\u09aa\u09be\u09a8\u09cd\u099c\u09c0 \u0995\u09be\u09b0\u09a8 \u098f\u09b0\u09be \u09aa\u09cd\u09b0\u09a4\u09cd\u09af\u09c7\u0995\u09c7 Mammalia Class \u099f\u09bf\u09b0 Representative \u0964 \u098f\u099f\u09be\u0987 OOP \u098f\u09b0 \u09ae\u09cc\u09b2\u09bf\u0995 \u09a7\u09be\u09b0\u09a8\u09be\u0964<\/p>\n<p>C \u0993 C++ \u098f\u09b0 \u09ae\u09a7\u09cd\u09af\u09c7 \u09aa\u09be\u09b0\u09cd\u09a5\u0995\u09cd\u09af \u09b9\u09b2 C++ \u098f OOP(Object Oriented programming) \u098f\u09b0 \u09b8\u09c1\u09ac\u09bf\u09a7\u09be \u09b0\u09df\u09c7\u099b\u09c7 \u09af\u09be JAVA \u09a4\u09c7 \u09aa\u09c2\u09b0\u09cd\u09a3\u09a4\u09be \u09aa\u09c7\u09df\u09c7\u099b\u09c7 \u0964<br \/>\nObject Oriented programming \u0986\u09ae\u09be\u09a6\u09c7\u09b0 \u09af\u09c7 \u09b8\u09c1\u09ab\u09b2\u0997\u09c1\u09b2\u09cb \u09a6\u09bf\u09df\u09c7\u099b\u09c7 \u09b8\u09c7\u0997\u09c1\u09b2\u09cb \u09b9\u09b2\u0983<br \/>\n01. Data Encapsulation<br \/>\n02. Data Hiding<br \/>\n03. Polymorphism<br \/>\n\u098f\u0987 \u09a4\u09bf\u09a8\u099f\u09bf \u09b8\u09ae\u09cd\u09aa\u09b0\u09cd\u0995\u09c7 \u09aa\u09b0\u09ac\u09b0\u09cd\u09a4\u09c0\u09a4\u09c7 \u09ac\u09bf\u09b8\u09cd\u09a4\u09be\u09b0\u09bf\u09a4 \u09ac\u09b2\u09ac\u0964<\/p>\n<p>\u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae\u09bf\u0982 \u0995\u09b0\u09be\u09b0 \u09b8\u09ae\u09df \u0986\u09ae\u09b0\u09be \u09af\u0996\u09a8 \u0995\u09cb\u09a8 Class \u098f\u09b0 Declaration \u09a6\u09bf\u09ac \u09a4\u0996\u09a8 \u0990 Class \u098f\u09b0 \u09ac\u09b8\u09cd\u09a4\u09c1 \u09ac\u09be Object \u098f\u09b0 \u0995\u09bf \u0995\u09bf \u09ac\u09c8\u09b6\u09bf\u09b7\u09cd\u099f\u09cd\u09af \u09a5\u09be\u0995\u09ac\u09c7 \u09a4\u09be \u09a8\u09bf\u09b0\u09cd\u09a7\u09be\u09b0\u09a3 \u0995\u09b0\u09c7 \u09a6\u09c7\u09ac\u0964 \u09a6\u09c1\u0987 \u09a7\u09b0\u09a3\u09c7\u09b0 \u09ac\u09c8\u09b6\u09bf\u09b7\u09cd\u099f\u09cd\u09af \u09a5\u09be\u0995\u09a4\u09c7 \u09aa\u09be\u09b0\u09c7, \u09e7\u0964 Attribute \u09e8\u0964 Member function<\/p>\n<p>\u0989\u09a6\u09be\u09b9\u09b0\u09a8:<br \/>\n[code]<br \/>\nClass Car{          \/\/ Car is the user defined classname<br \/>\n\/\/these three are attribue of the class Car<br \/>\nChar carname[20];<br \/>\nint wheel;<br \/>\nchar color;<\/p>\n<p>\/\/these are the member functions<br \/>\nvoid getnameofcar(){<br \/>\ncin&gt;&gt;carname;<br \/>\n}<br \/>\nvoid getnumberofwheel(){<br \/>\ncin&gt;&gt;wheel;<br \/>\n}<br \/>\n};  \/\/a semicolon must be placed after the declarationof that class<br \/>\n[\/code]<br \/>\n\u09a4\u09be\u09b9\u09b2\u09c7 \u09a6\u09c7\u0996\u09be \u09af\u09be\u099a\u09cd\u099b\u09c7 \u09af\u09c7 Car \u09b6\u09cd\u09b0\u09c7\u09a3\u09c0\u09b0 \u09b8\u0995\u09b2 Object \u098f\u09b0 \u09a4\u09bf\u09a8\u099f\u09bf Attribute \u09a5\u09be\u0995\u09ac\u09c7 \u09af\u09a5\u09be\u0983 carname,wheel \u098f\u09ac\u0982 color \u0964 \u098f\u09ac\u0982 \u09e8 \u099f\u09bf function \u0986\u099b\u09c7\u0964 \u098f\u0987 \u09ac\u09c8\u09b6\u09bf\u09b7\u09cd\u099f\u09cd\u09af\u0997\u09c1\u09b2\u09cb \u09a4\u09bf\u09a8 \u09a7\u09b0\u09a8\u09c7\u09b0 \u09b9\u09a4\u09c7 \u09aa\u09be\u09b0\u09c7 \u09af\u09a5\u09be\u0983 public, private and protected.<\/p>\n<p>An example :<br \/>\n[code]<br \/>\n#include&lt;stdio.h&gt;<br \/>\n#include &lt;iostream&gt;<br \/>\nusing namespace std;<\/p>\n<p>Class Car{          \/\/ Car is the user defined classname<br \/>\n\/\/these three are attribue of the class Car<br \/>\nChar carname[20];<br \/>\nint wheel;<br \/>\nchar color;<\/p>\n<p>\/\/these are the member functions<br \/>\nvoid getnameofcar(){<br \/>\ncin&gt;&gt;carname;<br \/>\n}<br \/>\nvoid getnumberofwheel(){<br \/>\ncin&gt;&gt;wheel;<br \/>\n}<br \/>\n};  \/\/a semicolon must be placed after the declarationof that class<\/p>\n<p>int main(){<\/p>\n<p>Car obj1,obj2;   \/\/ declaring of an object of Class Car<\/p>\n<p>obj1.getnameofcar();     \/\/ calling the function for obj1<br \/>\nobj1.getnumberofwheel();<\/p>\n<p>obj2.getnameofcar();  \/\/ calling the function for obj2<br \/>\nobj2.getnumberofwheel();<\/p>\n<p>cout&lt;&lt;ob1.carname&lt;&lt;endl;<br \/>\ncout&lt;&lt;ob1.wheel&lt;&lt;endl;<\/p>\n<p>cout&lt;&lt;ob2.carname&lt;&lt;endl;<br \/>\ncout&lt;&lt;ob2.wheel&lt;&lt;endl;<\/p>\n<p>return 0;<br \/>\n}[\/code]<br \/>\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\n<p><strong>Definitions:<\/strong><br \/>\nA<strong> class<\/strong> is a template for multiple objects with similar features. Classes embody all the<br \/>\nfeatures of a particular set of objects.<\/p>\n<p>An <strong>instance<\/strong> of a class is another word for an actual object. If classes are an abstract<br \/>\nrepresentation of an object, an instance is its concrete representation.<\/p>\n<p>Object is the more general term, but both instances and objects are the concrete representation of a class.<br \/>\nIn fact, the terms instance and object are often used interchangeably in OOP language. An instance of a Car and a Car object are both the same thing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0986\u09ae\u09b0\u09be \u099c\u09c0\u09ac\u099c\u0997\u09a4\u09c7\u09b0 \u09b6\u09cd\u09b0\u09c7\u09a3\u09c0\u09ac\u09bf\u09a8\u09cd\u09af\u09be\u09b8 \u099c\u09be\u09a8\u09bf\u0964 \u09af\u09c7\u09ae\u09a8 : \u09ae\u09be\u09a8\u09c1\u09b7\u09c7\u09b0 \u09ac\u09c8\u099c\u09cd\u099e\u09be\u09a8\u09bf\u0995 \u09a8\u09be\u09ae Homo sapiens \u0964 Mammalia \u09ac\u09be \u09b8\u09cd\u09a4\u09a8\u09cd\u09a8\u09aa\u09be\u09df\u09c0 \u09b6\u09cd\u09b0\u09c7\u09a3\u09c0\u09b0 \u098f\u0995\u099f\u09bf \u09aa\u09cd\u09b0\u09be\u09a3\u09c0 \u09ae\u09be\u09a8\u09c1\u09b7\u0964 \u098f \u09b6\u09cd\u09b0\u09c7\u09a3\u09c0\u09a4\u09c7 \u09b0\u09df\u09c7\u099b\u09c7 \u09ac\u09be\u09a8\u09b0 \u0993 \u09b6\u09bf\u09ae\u09aa\u09be\u09a8\u09cd\u099c\u09c0 \u09b8\u09b9 \u0986\u09b0\u0993 \u0985\u09a8\u09c7\u0995\u0964 \u09a4\u09be\u09b9\u09b2\u09c7,Mammalia class \u099f\u09bf\u09b0 \u09b8\u0995\u09b2 \u09ac\u09c8\u09b6\u09bf\u09b7\u09cd\u099f\u09cd\u09af \u09ae\u09be\u09a8\u09c1\u09b7,\u09ac\u09be\u09a8\u09b0 \u0993 \u09b6\u09bf\u09ae\u09aa\u09be\u09a8\u09cd\u099c\u09c0\u09b0 \u09b0\u09df\u09c7\u099b\u09c7\u0964 \u0985\u09b0\u09cd\u09a5\u09be\u09ce Mammalia Class \u098f\u09b0 Object \u09b9\u09b2 \u09ae\u09be\u09a8\u09c1\u09b7\/\u09ac\u09be\u09a8\u09b0\/\u09b6\u09bf\u09ae\u09aa\u09be\u09a8\u09cd\u099c\u09c0 \u0995\u09be\u09b0\u09a8 \u098f\u09b0\u09be \u09aa\u09cd\u09b0\u09a4\u09cd\u09af\u09c7\u0995\u09c7 Mammalia Class \u099f\u09bf\u09b0 Representative \u0964 \u098f\u099f\u09be\u0987 OOP \u098f\u09b0 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.ujjal.net\/?p=72\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Object Oriented programming&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-72","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\/72","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=72"}],"version-history":[{"count":0,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=\/wp\/v2\/posts\/72\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ujjal.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}