<?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>The benefits of Polymorphism are: Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/the-benefits-of-polymorphism-are/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/the-benefits-of-polymorphism-are/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Thu, 02 Sep 2021 13:16:07 +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 Polymorphism in OOPS</title>
		<link>https://www.scmgalaxy.com/tutorials/tutorial-for-polymorphism-in-oops/</link>
					<comments>https://www.scmgalaxy.com/tutorials/tutorial-for-polymorphism-in-oops/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Thu, 02 Sep 2021 13:16:06 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[benefits of Polymorphism]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[oops]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Polymorphism]]></category>
		<category><![CDATA[Polymorphism in OOPS]]></category>
		<category><![CDATA[The benefits of Polymorphism are:]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Tutorial for Polymorphism in OOPS]]></category>
		<category><![CDATA[What is Polymorphism]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=8655</guid>

					<description><![CDATA[<p>What is Polymorphism? Polymorphism, as its name implies, comes in a variety of forms. OOP allows for the use of a [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorial-for-polymorphism-in-oops/">Tutorial for Polymorphism 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>Polymorphism</strong>?</h3>



<p class="wp-block-paragraph">Polymorphism, as its name implies, comes in a variety of forms. OOP allows for the use of a variety of techniques I. Simply expressed, they have to do with how methods are used, and how different methods operate for different objects. Method Overriding and Method Overloading are two ways that polymorphic methods allow for different actions to be done.</p>



<p class="wp-block-paragraph"><strong>The benefits of Polymorphism are:</strong></p>



<ul class="wp-block-list"><li>Objects of different types can be passed through the same interface</li><li>Method overriding</li><li>Method overloading</li></ul>



<p class="wp-block-paragraph"><strong>Method Overriding</strong>:- Overriding is used in the polymorphism of runtime. By overriding a parent class&#8217;s method, a child class can implement a different method. In the case of our dogs, we may prefer a specific type of bark that is distinct from the generic type of dog (<code><span class="has-inline-color has-vivid-red-color">TrackingDog</span></code>).</p>



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



<script src="https://gist.github.com/AdarshAshwani/2f14c51fb9288cff503e2f683a4a540b.js"></script>



<div class="wp-block-image"><figure class="aligncenter is-resized"><img fetchpriority="high" decoding="async" src="https://www.devopsschool.com/blog/wp-content/uploads/2021/05/image-61.png" alt="" width="443" height="369"/><figcaption>TrackingDog’s overriding the bark() method</figcaption></figure></div>



<p class="wp-block-paragraph"><strong>Method Overloading</strong>:- Overloading is used at the polymorphic build time. Although methods and functions may have the same name, the call method has its own set of arguments. Different results may be obtained depending on the number of parameters entered.</p>



<p class="wp-block-paragraph"><strong>Example</strong>:- There are no parameters supplied to the <code><span class="has-inline-color has-vivid-red-color">updateAttendance()</span></code> method. The count will be added one day. When the <code><span class="has-inline-color has-vivid-red-color">updateAttendance(4)</span></code> argument is used, the x <code><span class="has-inline-color has-vivid-red-color">xupdateAttendance(x)</span></code> parameter is used, and four days are added to the total.</p>



<script src="https://gist.github.com/AdarshAshwani/5a4dc586be245a338a81b7127ea425c9.js"></script>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorial-for-polymorphism-in-oops/">Tutorial for Polymorphism 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-polymorphism-in-oops/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
