<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>objectorientedprinciples —   christova  </title>
    <link>https://christova.writeas.com/tag:objectorientedprinciples</link>
    <description>&lt;b&gt;&lt;h3&gt;Tech Articles&lt;/h3&gt;&lt;/b&gt;&lt;br/&gt;&lt;b&gt;Collated from various sources. Full copyright remains with original authors.&lt;/b&gt;</description>
    <pubDate>Mon, 16 Nov 2026 16:42:41 +0000</pubDate>
    <item>
      <title>OOP Principles</title>
      <link>https://christova.writeas.com/oop-principles?pk_campaign=rss-feed</link>
      <description>#oop #objectorientedprinciples Basic OOP Concepts Explained with Clear Examples: 1. 𝐄𝐧𝐜𝐚𝐩𝐬𝐮𝐥𝐚𝐭𝐢𝐨𝐧 Hide internal data behind public method...</description>
      <content:encoded><![CDATA[<p><img src="https://i.snap.as/KINR05Yh.jpg" alt=""/></p>

<p><a href="https://christova.writeas.com/tag:oop" class="hashtag" rel="nofollow ugc"><span>#</span><span class="p-category">oop</span></a> <a href="https://christova.writeas.com/tag:objectorientedprinciples" class="hashtag" rel="nofollow ugc"><span>#</span><span class="p-category">objectorientedprinciples</span></a></p>

<p><strong>Basic OOP Concepts Explained with Clear Examples:</strong></p>

<p>1. 𝐄𝐧𝐜𝐚𝐩𝐬𝐮𝐥𝐚𝐭𝐢𝐨𝐧
Hide internal data behind public methods.
- Example: A BankAccount class keeps balance and pin private. The only way to interact with it is through deposit() and getBalance().</p>

<p>2. 𝐀𝐛𝐬𝐭𝐫𝐚𝐜𝐭𝐢𝐨𝐧
Expose a simple interface, hide the complexity behind it.
- Example: An EmailService class gives you sendEmail(to, body). Internally, it handles SMTP connections, authentication, and retry logic. The caller doesn&#39;t need to know any of that. They just call one method and it works.</p>

<p>3. 𝐈𝐧𝐡𝐞𝐫𝐢𝐭𝐚𝐧𝐜𝐞
Let child classes reuse and override behavior from a parent class.
- Example: An Animal class defines speak(). Dog extends it and returns “Woof!”, Cat extends it and returns “Meow!”. Shared logic lives in one place, and each subclass customizes what it needs.</p>

<p>4. 𝐏𝐨𝐥𝐲𝐦𝐨𝐫𝐩𝐡𝐢𝐬𝐦
Write code that works with multiple types through a common interface.
- Example: Define a Shape interface with a draw() method. Now Circle, Rectangle, and Triangle each implement draw() their own way. A single drawShape(Shape s) method works with all of them.</p>
]]></content:encoded>
      <guid>https://christova.writeas.com/oop-principles</guid>
      <pubDate>Thu, 26 Mar 2026 13:35:47 +0000</pubDate>
    </item>
  </channel>
</rss>