{"id":688,"date":"2020-06-01T05:13:55","date_gmt":"2020-06-01T05:13:55","guid":{"rendered":"http:\/\/learnlearn.uk\/alevelcs\/?page_id=688"},"modified":"2020-09-09T06:24:09","modified_gmt":"2020-09-09T06:24:09","slug":"object-orientated-programming","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/","title":{"rendered":"Object Orientated Programming"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Classes &amp; Instances<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Class<\/h3>\n<p>A class is a blueprint\/blueprint for an object.<\/p>\n<ul>\n<li>Object \/ Instance<\/li>\n<li>Objects are what the blueprint makes.<\/li>\n<li>An instance is an individual object.<\/li>\n<li>Objects &amp; Instances are widely used interchangeably.<\/li>\n<li>A blueprint for a house design is like a class description. All the houses built from that blueprint are objects of that class. A given house is an instance.<\/li>\n<\/ul>\n<p><strong>Properties \/ Attributes<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Methods<\/strong><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Getters &amp; Setters<\/h2>\n<div class=\"tabcontent\">\n\n<h3><strong>Getters &amp; Setters<\/strong><\/h3>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Inheritance<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Inheritance<\/h3>\n<p><span style=\"font-weight: 400;\">This feature of OOP is where a subclass inherits a feature (either a method or attribute) from the parent class.<\/span><\/p>\n<p>&nbsp;<\/p>\n<pre>class MotorVehicle:\r\n    def __init__(self):\r\n        self.wheels = 4\r\n\r\nclass Car(MotorVehicle):\r\n    def __init__(self):\r\n        MotorVehicle.__init__()<\/pre>\n<pre>car = Car()\r\nprint(car.wheels)\r\n#Here Car inherits the wheels attribute from the parent class.\r\n\r\n<\/pre>\n\n<\/div><h2 class=\"tabtitle\">Poly-morphism<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Poly-morphism<\/h3>\n\n<\/div><h2 class=\"tabtitle\">Containment \/ Aggregation<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Containment \/ Aggregation<\/h3>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Project Ideas<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Project Ideas<\/h3>\n<p><a href=\"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming-exercises\/\">My Project Ideas List<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/muhammadallee.pbworks.com\/w\/file\/fetch\/6005943\/OOP-Project-Ideas.pdf\">http:\/\/muhammadallee.pbworks.com\/w\/file\/fetch\/6005943\/OOP-Project-Ideas.pdf<\/a><\/p>\n<p><a href=\"http:\/\/moodle.manalhelal.com\/pluginfile.php\/991\/mod_resource\/content\/0\/CC316_F2015_ProjectIdeas.pdf\">http:\/\/moodle.manalhelal.com\/pluginfile.php\/991\/mod_resource\/content\/0\/CC316_F2015_ProjectIdeas.pdf<\/a><\/p>\n\n<\/div><h2 class=\"tabtitle\">Resources<\/h2>\n<div class=\"tabcontent\">\n\n<h3><a href=\"https:\/\/docs.google.com\/presentation\/d\/1OxrukBqgt1RjvLi6bcHkYKQN1yCuYk14RUieDmvArTI\/edit?usp=sharing\">Teacher Presentation<\/a><\/h3>\n<p>&nbsp;<\/p>\n<h3>Past Paper Questions<\/h3>\n<p>Winter 19 Paper 41\u00a0 &#8211; Question 1C<\/p>\n<p>&nbsp;<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Class A class is a blueprint\/blueprint for an object. Object \/ Instance Objects are what the blueprint makes. An instance is an individual object. Objects &amp; Instances are widely used interchangeably. A blueprint for a house design is like a class description. All the houses built from that blueprint are objects of that class. A&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Object Orientated Programming<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":70,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Object Orientated Programming - A Level Computer Science<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Object Orientated Programming - A Level Computer Science\" \/>\n<meta property=\"og:description\" content=\"Class A class is a blueprint\/blueprint for an object. Object \/ Instance Objects are what the blueprint makes. An instance is an individual object. Objects &amp; Instances are widely used interchangeably. A blueprint for a house design is like a class description. All the houses built from that blueprint are objects of that class. A&hellip;&nbsp;Read More &raquo;Object Orientated Programming\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/\" \/>\n<meta property=\"og:site_name\" content=\"A Level Computer Science\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-09T06:24:09+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/\",\"name\":\"Object Orientated Programming - A Level Computer Science\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#website\"},\"datePublished\":\"2020-06-01T05:13:55+00:00\",\"dateModified\":\"2020-09-09T06:24:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"A Level Computer Science Home\",\"item\":\"https:\/\/learnlearn.uk\/alevelcs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Object Orientated Programming\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#website\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/\",\"name\":\"A Level Computer Science\",\"description\":\"CIE Specification\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/alevelcs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#organization\",\"name\":\"A Level Computer Science\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png\",\"width\":710,\"height\":98,\"caption\":\"A Level Computer Science\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Object Orientated Programming - A Level Computer Science","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/","og_locale":"en_GB","og_type":"article","og_title":"Object Orientated Programming - A Level Computer Science","og_description":"Class A class is a blueprint\/blueprint for an object. Object \/ Instance Objects are what the blueprint makes. An instance is an individual object. Objects &amp; Instances are widely used interchangeably. A blueprint for a house design is like a class description. All the houses built from that blueprint are objects of that class. A&hellip;&nbsp;Read More &raquo;Object Orientated Programming","og_url":"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/","og_site_name":"A Level Computer Science","article_modified_time":"2020-09-09T06:24:09+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/","url":"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/","name":"Object Orientated Programming - A Level Computer Science","isPartOf":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/#website"},"datePublished":"2020-06-01T05:13:55+00:00","dateModified":"2020-09-09T06:24:09+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/alevelcs\/object-orientated-programming\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"A Level Computer Science Home","item":"https:\/\/learnlearn.uk\/alevelcs\/"},{"@type":"ListItem","position":2,"name":"Object Orientated Programming"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/alevelcs\/#website","url":"https:\/\/learnlearn.uk\/alevelcs\/","name":"A Level Computer Science","description":"CIE Specification","publisher":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/alevelcs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/alevelcs\/#organization","name":"A Level Computer Science","url":"https:\/\/learnlearn.uk\/alevelcs\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png","contentUrl":"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png","width":710,"height":98,"caption":"A Level Computer Science"},"image":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/alevelcs\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Class A class is a blueprint\/blueprint for an object. Object \/ Instance Objects are what the blueprint makes. An instance is an individual object. Objects &amp; Instances are widely used interchangeably. A blueprint for a house design is like a class description. All the houses built from that blueprint are objects of that class. A&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages\/688"}],"collection":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/comments?post=688"}],"version-history":[{"count":9,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages\/688\/revisions"}],"predecessor-version":[{"id":848,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages\/688\/revisions\/848"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/media?parent=688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}