<?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 samanvitha channagiri on Medium]]></title>
        <description><![CDATA[Stories by samanvitha channagiri on Medium]]></description>
        <link>https://medium.com/@samanvithachannagiri?source=rss-c38fe1c12455------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bbb4LMM8t5vMbZwrKtDq3Q.png</url>
            <title>Stories by samanvitha channagiri on Medium</title>
            <link>https://medium.com/@samanvithachannagiri?source=rss-c38fe1c12455------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 18:35:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@samanvithachannagiri/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[The Abstract Truth: Unpacking Why an Abstract Class Can Inherit a Concrete Class in Java]]></title>
            <link>https://medium.com/@samanvithachannagiri/the-abstract-truth-unpacking-why-an-abstract-class-can-inherit-a-concrete-class-in-java-739b88f27dbb?source=rss-c38fe1c12455------2</link>
            <guid isPermaLink="false">https://medium.com/p/739b88f27dbb</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[oops-interview-questions]]></category>
            <category><![CDATA[oops-concepts]]></category>
            <dc:creator><![CDATA[samanvitha channagiri]]></dc:creator>
            <pubDate>Tue, 23 Sep 2025 04:51:25 GMT</pubDate>
            <atom:updated>2025-09-23T04:51:25.627Z</atom:updated>
            <content:encoded><![CDATA[<p>So, basically, I was studying Object-Oriented Programming (OOP) in Java, trying to solidify my understanding of abstract classes and interfaces, when I came across a line that said something like, “An abstract class can inherit a concrete class.” I double-checked it, because it seemed like a not-so-usual pattern. My immediate thought was, “Wait, what? Isn’t an abstract class supposed to be incomplete, and concrete classes are fully formed? How can an incomplete thing build upon a complete thing?” It felt a bit counter-intuitive at first glance.</p><p>I tried digging around a bit, trying to understand the ‘why’ behind this seemingly odd rule, and this is what I found. It turns out, it’s not only allowed but also incredibly useful in certain design scenarios.</p><h3>The Power of Building on a Foundation: Inheritance and Specialization</h3><p>My initial confusion stemmed from thinking of abstract classes purely as “things that <em>must</em> be extended because they’re incomplete.” But the core purpose of <strong>inheritance</strong> in OOP is about <strong>code reuse</strong> and <strong>specialization</strong>.</p><p>Imagine you’re building a system for handling various types of documents. All documents have basic, shared properties and behaviors. They need a title, an author, and a method to save them. You start with a concrete BaseDocument class. It&#39;s fully functional and provides all the fundamental, shared behaviors.</p><pre>public class BaseDocument {<br> private String title;<br> private String author;<br><br><br>public BaseDocument(String title, String author) {<br> this.title = title;<br> this.author = author;<br> }<br><br> public void save() {<br> System.out.println(&quot;Saving document &#39;&quot; + title + &quot;&#39; by &quot; + author);<br> }<br><br>}</pre><p>Now, you hit a wall. You need to create PDFDocument and XMLDocument classes. A PDFDocument needs a method to render a visual preview, while an XMLDocument needs to validate its structure. You can&#39;t just add a generic preview() or validate() method to BaseDocument, because they don&#39;t apply to every document type.</p><p>This is where the magic happens. You realize you can create a new layer of abstraction called WebDocument. This class can inherit all the common, already-implemented code from BaseDocument (like save()), so you don&#39;t have to rewrite it. At the same time, you can make WebDocument an <strong>abstract class</strong> and define a new, abstract method: render(). This creates a <strong>contract</strong>.</p><pre>public abstract class WebDocument extends BaseDocument {<br>    public WebDocument(String title, String author) {<br>        super(title, author);<br>    }<br><br>    public abstract void render();<br>}</pre><p>This works because it lets you reuse the code from BaseDocument while enforcing a contract on any new WebDocument you create. This is the core magic of <strong>polymorphism</strong> and <strong>inheritance</strong> combined.</p><p>In a real-world scenario, you can see this pattern in frameworks where a concrete base class provides shared utility (like logging, or basic network handling), and an abstract class extends it to define specific behaviors that different subclasses must implement. For example, a BasePaymentGateway abstract class could extend a concrete Logger class. All payment gateways would get logging functionality for free, but they would still have to provide their own specific logic for processPayment().</p><blockquote>It’s about having a functional base and then adding a layer of control and structure on top of it.</blockquote><p>Looking back, that initial moment of confusion was a great learning experience. It showed me that OOP isn’t just a rigid set of rules; it’s a flexible toolbox for solving design problems. That feeling of “Wait, can I do that?” is often a sign that you’re about to learn something really cool and useful.</p><p>So, next time you come across a weird-looking rule in a language, don’t just accept it. Dig into it. You might find a really elegant and powerful solution to a problem you didn’t even know you had. And you’ll have a great story to tell in your next tech article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=739b88f27dbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a single incident can change your life? But your determination can take you to heights!]]></title>
            <link>https://medium.com/@samanvithachannagiri/how-a-single-incident-can-change-your-life-but-your-determination-can-take-you-to-heights-a4a57f88b3ee?source=rss-c38fe1c12455------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4a57f88b3ee</guid>
            <category><![CDATA[self-determination]]></category>
            <category><![CDATA[life-lessons]]></category>
            <dc:creator><![CDATA[samanvitha channagiri]]></dc:creator>
            <pubDate>Thu, 17 Jul 2025 05:25:42 GMT</pubDate>
            <atom:updated>2025-07-17T05:25:42.781Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>A story of a little girl who lost her hands and injured her legs in a blast.</em></strong></p><p>Malavika Iyer, a 12-year-old highly active child, loved kite flying and playing the monkey tree game (<em>Marakothi Aata</em>), and was deeply interested in swimming and Bharatanatyam.</p><p>She was never much into academics.</p><p>Her goal was to become a dancer in the future.</p><p>This 12-year-old had no idea how her dreams were going to be crushed in just a year.</p><p>Her father was a Chief Engineer in the Irrigation Department. Once he got transferred to Bikaner, Rajasthan, her family moved there.</p><p>Their house was located near a military range. Months before May 2002, an accidental fire occurred at a military storage facility (where weapons and explosives are stored).</p><p>The fire caused unexploded bombs and grenades to scatter into nearby areas.</p><p>The child Malavika found an unexploded grenade. Nearby people told her it was a defused grenade and wouldn’t cause any harm. The kid thought it would be fun to use like a ball and hid it in the house.</p><p>But on <strong>May 26, 2002</strong>, everything changed.</p><p>It was a Sunday, and she had a holiday from school. The child remembered the grenade she had hidden in the house. Curious to know what might be inside it, she brought a hammer and hit the grenade with all her strength in front of her house.</p><p>The grenade exploded, injuring her severely.</p><p>It was <strong>May 30</strong> when she opened her eyes in the hospital.</p><p>In the blast, the bones in both of her legs were broken, and she had also lost both of her hands.</p><p>She had lost <strong>70% of the blood</strong> in her body.</p><p>She was shifted to Jaipur for better treatment, where doctors informed her parents that <strong>amputating her legs</strong> was the only option because the bones were completely shattered.</p><p>Her parents asked just one question:</p><blockquote><em>“She has already lost both her hands. Now if you cut off her legs, what about her future?”</em></blockquote><p>Both of her legs were supported with rods.</p><p>Days passed, and she began to recover in unexpected ways.</p><p>Before she could get up and sit, <strong>18 months</strong> had passed.</p><p>She had missed 1.5 years of schooling. <strong>Loneliness had started taking over her.</strong></p><p>Through all of this, her biggest support was her <strong>mother</strong>. She rubbed her daughter’s forehead and said:</p><blockquote><em>“My dear daughter, whatever happened, think of it like a bad dream. Don’t cry. I’m always here with you. I’ll help you write the exam privately. Let’s start a new life from today.”</em></blockquote><p>Her mother didn’t stop there. She got her daughter <strong>artificial hands</strong> that worked on batteries. From being a highly active child to having her life restricted within four walls, life had changed drastically.</p><p>Her mother took care of her with incredible sensitivity and made sure her daughter <strong>didn’t slide into depression.</strong></p><p>Malavika prepared for her <strong>10th exams privately</strong> and ranked <strong>first among all students</strong>. She was even <strong>congratulated by the President, Dr. A.P.J. Abdul Kalam</strong>.</p><p>She continued her higher studies in <strong>social work</strong> and completed her <strong>Ph.D.</strong> as well.</p><p>During her Master’s, while working with NGOs, she came across different people, discovered multiple perspectives, and when she compared her story with theirs, she realized:</p><blockquote><em>“There is much more suffering in this world, and I’m still in a much better place.”</em></blockquote><p>She has set an example that <strong>with self-confidence, one can reach anywhere they want</strong>, she is thankful to everyone who supported her through her <strong>journey of healing</strong>.</p><blockquote><em>Today, Malvika Iyer is not just a motivational speaker or a Ph.D. holder. She’s also a </em><strong><em>model for inclusive fashion</em></strong><em>, a </em><strong><em>global advocate for disability rights</em></strong><em>, and a </em><strong><em>symbol of unshakable confidence</em></strong><em>. She’s living proof that even when life blows your world apart, you can rebuild something stronger, </em><strong><em>if you refuse to give up</em></strong><em>.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4a57f88b3ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>