<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>what is Inheritance Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/what-is-inheritance/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/what-is-inheritance/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Wed, 01 Sep 2021 13:13:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Tutorial for Inheritance in OOPS</title>
		<link>https://www.scmgalaxy.com/tutorials/tutorial-for-inheritance-in-oops/</link>
					<comments>https://www.scmgalaxy.com/tutorials/tutorial-for-inheritance-in-oops/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Wed, 01 Sep 2021 13:13:35 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Function of Inheritance]]></category>
		<category><![CDATA[Inheritance]]></category>
		<category><![CDATA[Object-oriented programming]]></category>
		<category><![CDATA[oops]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[what is Inheritance]]></category>
		<category><![CDATA[What is the Function of Inheritance]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=8623</guid>

					<description><![CDATA[<p>what is Inheritance? In OOP, the concept of inheritance allows a class to accept or have the properties of another class [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorial-for-inheritance-in-oops/">Tutorial for Inheritance in OOPS</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">what is <strong>Inheritance</strong>?</h3>



<p class="wp-block-paragraph">In OOP, the concept of inheritance allows a class to accept or have the properties of another class (inherited). A sub-class or derived class is a class that inherits the characteristics/methods of another class. Heritage reduces code redundancy, allowing the class to use other class methods without having to rewrite the code. This allows for dynamic programming using the main class&#8217;s methods (also called the parent class). A subclass has the same properties as a primary class, but it can also have additional methods that are either completely independent or not present in the main class.</p>



<h3 class="wp-block-heading"><strong>What is the Function of Inheritance?</strong></h3>



<p class="wp-block-paragraph">Children&#8217;s classes may be built to enhance the parent&#8217;s class functionality and add more characteristics once essential properties and behaviors have been defined in the parent&#8217;s class.</p>



<p class="wp-block-paragraph"><strong>Example:-</strong> </p>



<p class="wp-block-paragraph">This distinction is demonstrated by creating a parent class child class(HerdingDog) (Dog) and then adding a single herd() behaviour.</p>



<p class="wp-block-paragraph">The following code shows how the child class (HerdingDog) inherits a parent class method (bark) (Dog), and the child class adds an extra method herd().</p>



<script src="https://gist.github.com/AdarshAshwani/56dd53858a250d518c8102194f9489c4.js"></script>



<p class="wp-block-paragraph">When the code uses the fluffy.bark() function, the method bark() travels up the child&#8217;s chain to find out where the bark method is declared.</p>



<script src="https://gist.github.com/AdarshAshwani/1b76d5c5645ed236d281b5d1af95eb7e.js"></script>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorial-for-inheritance-in-oops/">Tutorial for Inheritance in OOPS</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/tutorial-for-inheritance-in-oops/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
