Hello, in this python programming tutorial, we are going to look at overriding methods. So we've got this vehicle class right here, we've got this car class right here, which inherits from the vehicle class, Alex that inherits in its attributes, those The, the increase the method, that sort of stuff. But what if we want them slightly slightly different like functionality to one of the methods for increased speed, we can do that. And that's called overriding methods. And the way you do it is simply implement it within the child class. Because if it's not implemented it as the parents behavior as default if it's implemented as its own behavior as default, so for the increased speed, instead, maybe I want to point it instead.
So now, if we were to run this so let's just draw in the coastal you A 10 increase wait for child car, the 19 that's fine, you get zero for the speed so let's increase the speed of the child car. For now let's do child car the increase speed and we'll put five and what's gonna happen still not print zero because the default of zero, so let's just do one instead. So now so look 1019 increase the by fives. We should by default days ending today what we should Zero there, we create the child call in the press in the rerun it, there we go through the 1019. That's fine for increasing speed, it doesn't add it a time does it? Obviously it's a very simple example, but that is the principle of overriding method, a child class.
Now, inherited parents methods, if you want slightly different or you know, entirely different functionality with the same name, same parameter, you know, same structure of calling, essentially, you can override the method. That's it for this video. Thanks for watching and I look forward to seeing you in the next one.