<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shehan Dissanayake on Medium]]></title>
        <description><![CDATA[Stories by Shehan Dissanayake on Medium]]></description>
        <link>https://medium.com/@shehansk1998?source=rss-c19786ed60c3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*q39BE2gmmbJnKw8FM4sJHQ@2x.jpeg</url>
            <title>Stories by Shehan Dissanayake on Medium</title>
            <link>https://medium.com/@shehansk1998?source=rss-c19786ed60c3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 20:33:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shehansk1998/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What is OOP?]]></title>
            <link>https://medium.com/@shehansk1998/oop-concepts-54da5786acc4?source=rss-c19786ed60c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/54da5786acc4</guid>
            <dc:creator><![CDATA[Shehan Dissanayake]]></dc:creator>
            <pubDate>Thu, 08 Feb 2024 11:21:16 GMT</pubDate>
            <atom:updated>2024-02-08T19:29:16.684Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="What is OOP?" src="https://cdn-images-1.medium.com/max/1024/1*RkqQ66IEYGBdNjQSLAHFHg.png" /><figcaption>What is OOP?</figcaption></figure><p>Just like in the real world, an object in programming also has two things. They are <strong>attributes</strong> and <strong>methods</strong>.</p><p><strong>Attributes</strong> are the features of the object. Let’s take car as a real life example. Attributes of the car will be characteristics like model, mileage, color, maximum speed.</p><p><strong>Methods</strong> are the behaviors of the car like braking, honking, accelerating.</p><p>These Attributes and Methods collectively form a <strong>class</strong> named Cars. An object is an individual instance of a class. A Lamborghini car is an object of the class Cars. Attributes and Methods are the respective features and behaviors of the Lamborghini car.</p><p>There are 4 concepts in OOP</p><ol><li>Abstraction</li><li>Encapsulation</li><li>Inheritance</li><li>Polymorphism</li></ol><p><strong>Abstraction</strong></p><ul><li>It hides the complexity of the code and shows only what the user needs to see.</li><li>Abstraction class/interface is used to hide the complexity of the code.</li><li>Its’ just like using a Tv remote. You press the buttons. But the user don’t know what happens underneath the buttons.</li></ul><p><strong>Encapsulation</strong></p><ul><li>It is used to control the access levels of a class.</li><li>Access modifiers of a class are Public, Private and Protected</li></ul><p><strong>Inheritance</strong></p><ul><li>It is a mechanism that allows new class to be based on an existing class, inheriting it’s properties and behaviors.</li></ul><p><strong>Polymorphism</strong></p><ul><li>Ability of different objects or classes to be treated as instances of the same types.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54da5786acc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>