Will be polymorphism as the word goes.
We have poly and Marth.
So let's add the so we have poly in in many and we have more.
Which means smooth change, polymorphism and pattern can be implemented using an interface, and the
interface is some sort of method which can take many different forms which actually change depending
on the input.
So yeah, we could define this with the Founders interface, which permits us obtain the area of the
given smiley.
So we have area interface.
It takes in the object and then it returns that object, the head area.
There we go.
Now we've defined as interface.
Let's look at itself.
Below we define let's define this tool.
So firstly, we have happy and then we have some signs of type smiley and happy of type square smiley.
So right, yeah, we could have area interface and then we pass in happy.
So let's run this on that and there we go.
We see that was iPad's in happy.
We have its area.
We could also pass in Happy and then modify this and say, okay, we want a side value of C 21 that
we have not area we could pass inside and then pass in a radius of say, let's see, seven and then
we have this area interface which takes different forms depending on what we pass in what kind of object
we pass in.
Yeah, we have set, we run that.
Let's put in some prints here.
You have prints.
Prints.
Then we go, let's put in one year as you give us the apple one for that gorgeous pie square.
So that's fine.
So we're going to have whatever value here and we have its area.
So this interface now permits us to use the same piece of code to obtain the area for two different
objects.
And this helps us easily modify code and also maintain it.