I was actually confused by the technical jargon that comes with the explanation of design patterns and this video cleared up the confusion. Years old, but still useful. Cheers!
Was kinda confused at the start, but in the moment you started the declaration of the objects everything make sense and i could understand the design pattern. Thank Navin!
Better than Derek Banas, I came back heard after watching Banas composite design pattern tut, but as always real-world example nail it, u nailed it. Thanks much. Keep it up. Nice work. Didn't expect from thumbnail ,,😋. But u made ease.
I like a lot how you're teaching I'm subscribed now, I wish you had more videos about design patterns and algorithms and data structures. ty for your work!
3 things: 1) Why does the constructor calls super(); You can't initialize a interface right? 2) What if a leaf has 2 composition , so that means it would be in 2 different compositions so the price would count double? 3)How would this look like in real life? I mean, thats a HUGE and main?
None of the youtube tutorial provide example of what's the problem and how the same can be solved with composite design pattern. Everyone just starts with the pattern directly. Its really not useful for most of the beginners.
I liked this video because it explained the concept well. But the way you deliver can be improved. Please try to speak slowly and clearly, in this way there should be less chances of error.
Wouldn't it be better to pass in Leaf instances into the constructor or use a builder pattern to construct the Composites there by referencing them with Component instead of Composite?
At the beginning of these tutorials, we were told design patterns were created with two things in mind, "Composition over inheritance" and "Code for interface, not implementation." But here, we are coding to implementation, not interface. (With changing component to composite to use the addComponent() method. With this example, why are we not able to use the addComponent() method if we are using Component as the type, but instantiating a new Composite? And doesn't this go backwards on what is one of the rules for design patterns? Great work with the video and I understand the Composite design pattern through this, but these two hang ups are making me a bit confused. Hoping someone can clear this up for me. Thanks future person. :)
What if I want to do subtotal of prices like Ram 1500 CPU 5000 Total Motherboard price 6500 HDD 3000 Total cabinet price 9500 Monitor 5000 Mouse 500 Keyboard 1000 Total peripheral device 6500 Total computer price 22500
The computer is a composite. It implements the component interface so it must have a getPrice() method. This composite class contains an Array of his own composites or leafs, he iterates trough it ( with a forloop) and you can add a variable (local or global) to the composite, doing in every iteration TotalValue += c.getprice
Hi Naveen, why dint you complete all the design patterns? Also, video qualities are good but not lucrative, see Joma videos for his video lucrative quality.
I was actually confused by the technical jargon that comes with the explanation of design patterns and this video cleared up the confusion. Years old, but still useful. Cheers!
Was kinda confused at the start, but in the moment you started the declaration of the objects everything make sense and i could understand the design pattern. Thank Navin!
Better than Derek Banas, I came back heard after watching Banas composite design pattern tut, but as always real-world example nail it, u nailed it. Thanks much. Keep it up. Nice work. Didn't expect from thumbnail ,,😋. But u made ease.
you are simply great sir!!! i got inspired by the way you explain and makes it so simple. woww!!!
you made it very much simple with real life example ..
Thanks a lot
This was complicated at first but after writing the code by myself and analyzing it further on my own I was able to grasp it.
I like a lot how you're teaching I'm subscribed now, I wish you had more videos about design patterns and algorithms and data structures. ty for your work!
Side video of yours, make it more engaging. Content is good and easy to understand as always.
Please post remaining design patterns i.e Observer,Decorator etc.Your teaching is really nice
Man is saving my semester!
You can use CTRL+D to delete a line. By the way amazing vidoes
Best tutorial ever, thank you a lot, easy to understand even for beginners.
This video is very helpful for my exam. I would really appreciate if you give more practical example.
This video really helped me to unravel this taunting topic. Thanks.
lol
Thank you Navin for the great videos, you are an awesome teacher =)!
3 things:
1) Why does the constructor calls super(); You can't initialize a interface right?
2) What if a leaf has 2 composition , so that means it would be in 2 different compositions so the price would count double?
3)How would this look like in real life? I mean, thats a HUGE and main?
Very well explained. Thank you very much!
This video is really good. I like the example you used.
amazing as usual. I enjoyed watching this video
great video. Thanks a lot❤❤
If you show the UML diagram for the implementation. it would be good and also much easier for you to explain.
None of the youtube tutorial provide example of what's the problem and how the same can be solved with composite design pattern. Everyone just starts with the pattern directly. Its really not useful for most of the beginners.
I liked this video because it explained the concept well. But the way you deliver can be improved. Please try to speak slowly and clearly, in this way there should be less chances of error.
Also maybe don't have the interface component be named so closely to composite because it was widly confusing at times.
Wouldn't it be better to pass in Leaf instances into the constructor or use a builder pattern to construct the Composites there by referencing them with Component instead of Composite?
excellent tutorial naveen
You deserved better than 20 likes Sir
Good explanation and got on composite design pattern
Thanks for the video :)
Very well explained. Good example also!
Thank you very much for your video.
Thank you for explaining what Derek Banas could not.
when you are planning to add tutorials for all other Design Patterns ?
Superb explanation sir....Can you pls tell me what's the role of composite pattern in it industry????Is it kinda database manipulation?
Navin sir may I know what are the design patterns u have prepared videos
you are the best!
Great explanation. Keep up man.
This is beautiful 👌
masth cheppav annaa ,peru kuda bale fancy ga pettav , telsukuntunnaa
Good example with nice exp
Great explanation Thank you
very very nice example
You're awesome. Thanks.
At the beginning of these tutorials, we were told design patterns were created with two things in mind, "Composition over inheritance" and "Code for interface, not implementation."
But here, we are coding to implementation, not interface. (With changing component to composite to use the addComponent() method.
With this example, why are we not able to use the addComponent() method if we are using Component as the type, but instantiating a new Composite? And doesn't this go backwards on what is one of the rules for design patterns?
Great work with the video and I understand the Composite design pattern through this, but these two hang ups are making me a bit confused.
Hoping someone can clear this up for me. Thanks future person. :)
Thank you for the video
Nice explaination sir
Is composition same as composite design pattern?
can you please put more videos on design patterns
thank you sir... better than derek bannas
think they supplement each other well. I find derek bannas usually a good source but definitely needed some help after his video on composite pattern
i never understand derek bannas design pattern tutorials, this is so much better
I'm losing focus in his tutorials because of the emphasizing... He sounds like an auctioneer on a fast talking contest.
soo useful vides keep it up
रेड्डी मामा, आप अच्छे हो।
Wow....thanks...:)
good explanation
waht is the alternative pattern of composite pattern
What font is used in your text editor?
What if I want to do subtotal of prices like
Ram 1500
CPU 5000
Total Motherboard price 6500
HDD 3000
Total cabinet price 9500
Monitor 5000
Mouse 500
Keyboard 1000
Total peripheral device 6500
Total computer price 22500
awesome!
How would you implement a method that returns the total value (sum cost of all components) of the computer?
The computer is a composite. It implements the component interface so it must have a getPrice() method. This composite class contains an Array of his own composites or leafs, he iterates trough it ( with a forloop) and you can add a variable (local or global) to the composite, doing in every iteration TotalValue += c.getprice
How is it different from aggregation ?
Hi Naveen, why dint you complete all the design patterns?
Also, video qualities are good but not lucrative, see Joma videos for his video lucrative quality.
This confuses me with template,decorator and builder design pattern
its good video
Hi Navin,
Could you please add more tutorial for all design patterns.
anyone have the code in c++?
love u
You are alien
👍👍👍👍👍👏👏👏👏👏👏🙏🙏🙏🙏🙏