In this video, we learn the strategy pattern in object oriented design. We discuss how to implement strategy pattern with an example from a famous computer game "Age of Empires".
Waiting patiently until the next one. Hope it is soon! I'm a huge fan of Age Of Empires and you using it as an example is very unique. All other videos are rinse and repeat. You bring light to the situation! Great job!
Falling in love with your Videos Joshi Sir. I used to watch movies when getting bored but now following your videos. Surprisingly your clean and entertaining explanation makes me forget that I was bored. Thank you so much.
Thanks for the video. You are an amazing teacher. You simplified the concept and make me understand it in less than 20 min. Please keep posting the good videos.
Realy valuable content Bro! Thank you so much for sharing your knowledge and valuable experience, and your teaching style is very nice. Again thank you so much for your kind work.
just saw few design patterns and couldn't resist myself going to your channel and exploring what more things you have to offer me.. Really like your teaching style..
Sir, your videos are best.. Even my teacher can't teach so well... But I need all pattern as my exams are coming soon I want you to cover all of them as soon as possible
Nice explanation. Can you please make videos on OOAD by having some real case study like design Rate Limiter or Design Airline Traffic System controller
I got really confused.....how it is possible to create an object for interfaces refillable and repairable in the soldier class...... thanks in advance..
It is called polimorphism. You can assign the concrete class in this way: Refillable refillable = new TimeBasedRefill(); The variable "refillable" which is a reference of type "Refillable" points to an Object of a concrete class "TimebasedRefill". Any class that extends this Interface can be assigned to this variable, because it IS Refillable. Later, you can use a setter method e.g. setRefillable(new WeaponBasedRefill()), to change the Object dynamically to a different concrete class. You use the reference "refillable" in your code. You do not have to think what the concrete implementation is. You just call refillable.refill() and it works. (It uses the concrete implementation.) I hope this helps you. :)
Hello BBarters, I joined really late to the party. Here I just want to understand where is the strategy? we are using polymorphism right? but where we are really using the strategy?
this is a very good explanation, super clear but I am a novice in Design Patters. Here how do we create refill and repair interface in c++, you mean to say create Abstract class for these also ?? please answer
Thank you so much for your explanation using diagrams, it moves my brains. Also, I have a request please, is it possible to use more accurate UML notation when you are drawing relationships between 2 classes/interfaces? in order to differentiate composition, aggregation, association, and so on :). Thank you again.