{"id":8439,"date":"2015-02-14T07:36:05","date_gmt":"2015-02-14T07:36:05","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=8439"},"modified":"2015-02-14T07:36:05","modified_gmt":"2015-02-14T07:36:05","slug":"computer-science-programming-the-object-oriented-paradigm","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/computer-science-programming-the-object-oriented-paradigm\/","title":{"rendered":"Computer science:  programming:  the object oriented paradigm"},"content":{"rendered":"<h1>The tutor recalls hearing about object oriented programming in the early 90s. \u00a0 Here&#8217;s a brief introduction.<\/h1>\n<p>Back in November I wrote a post about <a href=\"?p=6395\">procedural programming,<\/a> which was probably dominant during the &#8217;80s and before.  It involved breaking a problem into sub-problems, then writing corresponding subroutines to tackle them. The key was to understand a good way to compartmentalize the problem.  Then, the subroutines would be written.  Each comprised a group of coordinated commands that would solve <em>that<\/em> part of the problem.  Working in concert, the subroutines would lick the problem, start to finish.<\/p>\n<p>Object oriented programming is a different approach, especially at first.  Its focus is creating objects, which can be seen as complex data types.  An object can contain variables, arrays, etc., as well as its own procedures for manipulating the data.  In object oriented programming (often abbreviated OOP), procedures are often called <em>methods<\/em> rather than procedures or functions.<\/p>\n<p>Central to the OOP paradigm is the idea that to solve a problem, you organize the data into convenient objects with relevant methods.  Depending on the complexity of the problem, you might need to invent a few different types of objects, a few dozen, or even more.<\/p>\n<p>In OOP, a type of object is often called a <em>class<\/em>.  An instance of a class is then called an <em>object<\/em>.  For example, if chair is a class, then the wooden straight-backed chair I&#8217;m sitting on is an instance of that class.  As an instance of a chair, that straight-backed chair is an object.  When an instance of a class is created, it can be customized to suit a given purpose, just as different types of chairs can be produced depending on what&#8217;s in demand.<\/p>\n<p>With well-built objects that work well together, a problem can hopefully be solved.  That is the aim and belief of the OOP paradigm.  It&#8217;s likely the leading programming paradigm right now, and likely has been for the past decade, and maybe even the past several.<\/p>\n<p>I&#8217;ll be talking more about OOP in future posts:)<\/p>\n<p>Source:<\/p>\n<p>Niemeyer &#038; Knudsen, <em>Learning Java<\/em>.  Sebastopol, California:  O&#8217;Reilly Media, Inc., 2005.<\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The tutor recalls hearing about object oriented programming in the early 90s. \u00a0 Here&#8217;s a brief introduction. Back in November I wrote a post about procedural programming, which was probably dominant during the &#8217;80s and before. It involved breaking a &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/computer-science-programming-the-object-oriented-paradigm\/\"> <span class=\"screen-reader-text\">Computer science:  programming:  the object oriented paradigm<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105],"tags":[516,514,515],"class_list":["post-8439","post","type-post","status-publish","format-standard","hentry","category-computer-science","tag-object-oriented-paradigm","tag-object-oriented-programming","tag-oop"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/8439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=8439"}],"version-history":[{"count":24,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/8439\/revisions"}],"predecessor-version":[{"id":8463,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/8439\/revisions\/8463"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=8439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=8439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=8439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}