Template Method Design Pattern

Поділитися
Вставка
  • Опубліковано 18 січ 2025

КОМЕНТАРІ • 165

  • @benjaminbrodeur8537
    @benjaminbrodeur8537 2 роки тому +8

    After 9 years, and still the best tutorial on software design intro on the internet. Thank you, Derek!

  • @derekbanas
    @derekbanas  11 років тому +12

    Thank you :) You're very kind. I'm just happy that you enjoy the videos. I don't require anything else. I'm actually more popular in India and South Africa then I am in my country. I was amazed when I discovered that!

  • @derekbanas
    @derekbanas  11 років тому +3

    Thank you very much :) I haven't covered C# yet mainly because I decided about 2 years ago to make different tutorials from everyone else on UA-cam. I see no point in making the same 5 minute tutorials that everyone else makes. That is why I tend to make 15 to 30 minute videos with all the pauses removed (Most are 45 to an hour before editing). I also decided to make grand tutorials that cover everything. To do that I had to give up on briefly covering topics. I'll cover C# some day :)

  • @derekbanas
    @derekbanas  11 років тому

    Yes you could definitely optimize the code. I cover that in my refactoring tutorials. My main focus here was to make the main parts of the pattern understandable. I hope that makes sense

  • @donmrx
    @donmrx 2 роки тому +1

    derek imma be honest with u, ive been watching your videos for 12 hours straight on a crunch to finish a college assignment, so I dont want to hear your voice anymore today... but your videos are great well done!

    • @derekbanas
      @derekbanas  2 роки тому +2

      That's funny :) I'm happy I could help and I wish you the best of luck on your assignment

  • @derekbanas
    @derekbanas  12 років тому

    I use Eclipse mainly because it looks the same on every OS. Being free also is nice :) I have continued to use Eclipse Indigo because Eclipse Juno is buggy. Do a search for Eclipse Indigo and you'll find it. I specifically use Eclipse Classic Indigo Service Release 2

  • @derekbanas
    @derekbanas  11 років тому

    It all depends on the problem. Design pattern usage is learned after you gain a great deal of experience.

  • @derekbanas
    @derekbanas  12 років тому

    Bless you as well :) I'm glad you find it useful

  • @danobot12
    @danobot12 9 років тому +49

    this tutorial made me really hungry. That sandwich sounds awesome.

    • @derekbanas
      @derekbanas  9 років тому +2

      +danobot That's funny :)

    • @jarrinderricks1307
      @jarrinderricks1307 8 років тому

      +danobot Beef, swiss, mushrooms, and green peppers

    • @camilo.antonio
      @camilo.antonio 7 років тому +2

      Never would I have imagined a video about programming would make me this hungry.

    • @karimfrmrussia
      @karimfrmrussia 6 років тому

      Derek, we demand cooking tutorials! :)

  • @derekbanas
    @derekbanas  11 років тому

    You're very welcome :) I'm using java in this tutorial

  • @derekbanas
    @derekbanas  12 років тому

    Thank you :) I hope you enjoy them

  • @derekbanas
    @derekbanas  11 років тому

    Yes you could provide a more generic name for the methods and have them be more specialized. You are free to do what ever makes sense to you. The design patterns are just a guide. They are not set in stone

  • @trolden9520
    @trolden9520 7 років тому +1

    Hey man. I'm sitting here reading up on an exam on software design patterns, and i just watched your videos on the strategy pattern and the template pattern. I guess i just wanted to say thanks for these videos, they're really well made!
    They're easy to understand, and the length and level of detail is just perfect. Cheers! :)

    • @derekbanas
      @derekbanas  7 років тому

      Thank you :) I'm happy that they cleared up the patterns

  • @jaxt9271
    @jaxt9271 2 роки тому +1

    Thank you brO!! Got an exam on design patterns wednesday !

    • @derekbanas
      @derekbanas  2 роки тому +1

      Happy to help :) Best of luck on your exam

  • @venkatats6293
    @venkatats6293 6 років тому +1

    Excellent Derek, you made very difficult to understand patterns very simple. It's worth much more. Thank you.

  • @pr0master
    @pr0master 12 років тому

    Wow..Wow.. I didn't check well. Man, I can't believe your doing this all for free. I really appreciate your work. God bless you!

  • @MrAnonimR
    @MrAnonimR 5 років тому +2

    Thank you for your time and dedication in creating these tutorials. I appreciate it a lot !

    • @derekbanas
      @derekbanas  5 років тому

      Thank you very much :) I'm happy I could help

  • @derekbanas
    @derekbanas  12 років тому

    Thank you :) I did a ton of Swing tutorials in my Java video tutorial. I covered pretty much everything there. I didn't use NetBeans though because I thought it hampered complete control. I'll visit NetBeans soon, but have you seen my current Swing tutorial?

  • @vbnandu867
    @vbnandu867 11 років тому

    Derek! You are the answer to my prayers!!
    If I ever meet you(I stay in india, btw), I owe you a cup of coffee atleast!

  • @xipity
    @xipity 7 років тому +1

    Folks, this guy knows what he is talking about. Thanks again :)

    • @derekbanas
      @derekbanas  7 років тому

      Thank you :) I try to do my best

  • @derekbanas
    @derekbanas  12 років тому

    Do you want a tutorial on JAX-WS and JAX-RS?

  • @derekbanas
    @derekbanas  12 років тому

    Thank you SawMan :)

  • @mailshiva
    @mailshiva 6 місяців тому

    Simple and easy to learn - Thank for the tutorial

  • @chandup832
    @chandup832 5 місяців тому

    2024 learning here and getting value from your videos 😍 Thanks for your great work👏

  • @JamieGould83
    @JamieGould83 11 років тому +3

    Really enjoying the series so far! One question though, considering the methods are marked abstract and therefore an implementation is forced are the hooks actually required? Even if the methods were called the result would be the same. I'm assuming that in a real world implementation there would be another purpose for the hooks, or perhaps because there would often be an implementation in a super class and it would only be the hook in the descendent that prevented it being used?

  • @HGeneAnthony
    @HGeneAnthony 12 років тому

    I just watched one of your videos and it was great, I'm looking forward to checking out the rest of your videos.

  • @satyanarayanaeluri4854
    @satyanarayanaeluri4854 7 років тому +2

    It makes so much sense now. Thank You!

    • @derekbanas
      @derekbanas  7 років тому

      I'm very happy it helped :)

  • @spaarks84
    @spaarks84 11 років тому

    Perfectly clear. Perfectly engaging. Perfectly applicable to the subject matter.
    Perfect video.

    • @derekbanas
      @derekbanas  11 років тому

      Thank you very much :) It is very nice of you to say that.

  • @bharanikrishna7
    @bharanikrishna7 8 років тому +3

    Your content is amazing. I appreciate all the effort you put into these videos. Keep up the good work man. :)

    • @derekbanas
      @derekbanas  8 років тому +1

      Thank you very much :) More are coming

  • @chunghimbenedictchan3162
    @chunghimbenedictchan3162 11 років тому

    Thanks Derek Banas for the information, may i ask what programming language that this program runs?

  • @ahmadalhaj-karim6279
    @ahmadalhaj-karim6279 5 років тому

    I think for the methods that are executed either way should be defend as final + all the methods have to be protected so that it can not be manipulated from the outside.
    Thank you for the awesome explanation

  • @123japanuser
    @123japanuser 12 років тому

    Yes BOSS, it would be very nice of you.
    In my interview I always say NO IDEA to the interviewer :(

  • @KingMartinelli
    @KingMartinelli 9 років тому

    Hi Derek , thank you again for this nice tutorial!
    You explained it very well. I commented yesterday one video of yours, that I was studying for my exam in software engineering. Well today when i watched this video, I was also studying, but you talked so much about sandwiches that I took my car keys and drove to subway (sandwich restaurant).. :P

    • @derekbanas
      @derekbanas  9 років тому

      KingMartinelli That's funny :) You're very welcome

  • @tibimose823
    @tibimose823 8 років тому +2

    My issue with this is the the hook (boolean) methods are dependent of the abstract methods and you have to look anyway in the superclass what is the implementation of makeSandwich(). I don't see how this pattern can be useful, unless you can force the implementation of addMean() only if checkWantsMeat() returns true and I don't see a way to do that.

  • @gptgotjokes
    @gptgotjokes 12 років тому

    Hey derek i have a question. I am a windows user and i want to follow your tutorials while i try them myself. What pdt should i use? I see that you use eclipse in some of your videos. Which version should i download? Or does every download allow you to use java, JavaScript, php, etc within the download. Sorry if im confusing you lol.

  • @azharshaik6543
    @azharshaik6543 10 років тому +1

    Great work Derek...its really helpful...

    • @derekbanas
      @derekbanas  10 років тому

      Azharuddin Shaik Thank you very much :)

  • @shrikantbmali
    @shrikantbmali 11 років тому

    Hay Derek, I find your territorials very useful, but I have one q!
    why don't have any of your tutorial in c#? which I like most.

  • @marcelizgin9620
    @marcelizgin9620 10 років тому +3

    You're doing a great job with your videos. The last part with the new lines was not necessary though :)

    • @derekbanas
      @derekbanas  10 років тому

      Marcel Izgin Thank you :)

    • @amann95
      @amann95 7 років тому

      How does ur code work at the end? in the Hoagie class u used addVegetables() instead of addCondiments() function that u both later overwrote, soooo shouldnt it add veggies 2 times instead? in code provided u fixed this, but in video its different? 1st time u ran it u can see the 2nd sandwich having veggies x2 but adding these newlines fixed it? lol how? btw great videos ty for ur work

  • @M2dScientist
    @M2dScientist 10 років тому

    Great job, Derek! Very easy to follow and understand!
    You should give homework's to your viewers :D

  • @rashitiwari3154
    @rashitiwari3154 4 роки тому +1

    Great videos Derek! Wanted to ask you to get better clarity of OOPS concepts, should I practice your design pattern videos or you recommend any other video in playlist?

    • @derekbanas
      @derekbanas  4 роки тому

      Thank you :) I think my best OOP series is my Object Oriented Design series ua-cam.com/video/fJW65Wo7IHI/v-deo.html

    • @rashitiwari3154
      @rashitiwari3154 4 роки тому

      Thanks Derek

  • @stavalfi
    @stavalfi 7 років тому

    You are a great lucturer! Nice video!

  • @sahilrally4491
    @sahilrally4491 11 років тому

    Thanks from India. :-). Cannot we have all the implementation in the super abstract class and just pass in the things that varies. Like we can have addVeggies() method in the superclass which adds all the veggies mentioned in String[]. Now we can just make a setter method for this variable and make it abstract to force subclasses to just pass the veggies they want to add.
    Moreover , having do-nothing method in VeggieHogiie i.e is addMeat() is confusing, cannot we get rid of this ?

  • @ZorakTheGreat
    @ZorakTheGreat 8 років тому

    Great tutorial. You explain very well even though you move fast. Subscribed!

  • @EpicphoneGamer
    @EpicphoneGamer 2 роки тому +1

    nice

  • @SuperDranger
    @SuperDranger 8 років тому +2

    Thank you so much please please keep up the good work.

    • @derekbanas
      @derekbanas  8 років тому

      Thank you :) I'll do my best

  • @pr0master
    @pr0master 12 років тому

    You are great!. I do have a suggestion; creating a tutorial about Swing in JAVA. I find it really hard to create a user interface with swing. I use the swing builder of the netbeans IDE.

  • @pictureus
    @pictureus 11 років тому

    What's better, this or the decorator pattern? Thought you said Decorator pattern would replace this kind of pattern? :O

  • @sahilrally4491
    @sahilrally4491 11 років тому

    Yes . Is there any way to get rid of do-nothing implementations in clasees, like strategy pattern avoids it , but here again we have do-nothing methods in subclasses which does not add meats.

  • @claudiugurita5005
    @claudiugurita5005 3 роки тому

    Really helpful. Thank you! :)

  • @DerekBaker90
    @DerekBaker90 9 років тому

    Thanks for these videos! I just want to say you forgot to change the 'customerWantsCondiments' implementation on Hoagie.java (min 6:38). It says "addVegetables()" and should be "addCondiments()" (may be you can just add a corrective note there). But that's just a minimum common error when copying and pasting :P
    Thank you very much!

    • @derekbanas
      @derekbanas  9 років тому

      +Derek Baker Thank you for the input :) Sorry about that error.

  • @Aberhamgoitom
    @Aberhamgoitom 9 років тому

    Derek , This is awesome Man!!

    • @derekbanas
      @derekbanas  9 років тому

      Aberham Goitom Thank you :)

  • @MrStylesp9
    @MrStylesp9 11 років тому

    So any non abstract method in an abstract class is a hook?

  • @rodneytheredmage3436
    @rodneytheredmage3436 5 років тому

    Thank you Mr. Banas-sensei!!!!

    • @derekbanas
      @derekbanas  5 років тому

      I'm very happy to serve :)

  • @eshgholah
    @eshgholah 10 років тому +1

    Thanks for another good video.when it came to implementation of addMeat() in the VegieHoagie class we were forced to implement this method even though logically it was not needed to be there at all. I guess we could have implemented it in the abstract class Hoagie and any type of concrete Hoagie would just override it. And in the case of not needing it overriding the method customerWantsMeat() and making it return false in the VegieHoagie class would have been enough to avoid calling the addMeat() version of the abstract Hoagie, which would be perfectly fine. What is your opinion? Thanks

    • @derekbanas
      @derekbanas  10 років тому +1

      Yes I agree that I could have demonstrated a more optimized way to solve that issue. I made a gut decision that by doing so I may confuse people about the pattern. Maybe that was wrong in hind sight?

    • @eshgholah
      @eshgholah 10 років тому +1

      Many thanks for your response. You were not wrong if your purpose was to demonstrate the pattern rather than thinking about the principles of clean coding.

  • @derekbanas
    @derekbanas  12 років тому

    Grote puzzel. Het kostte me een seconde :)
    Ich bin froh, dass du die Videos gefallen
    Merci d'avoir regardé

  • @siavashrabiepour9716
    @siavashrabiepour9716 6 років тому

    best basic tutorial

    • @derekbanas
      @derekbanas  6 років тому

      Thank you :) I'm happy to be of help

  • @JoeSmith69
    @JoeSmith69 8 років тому

    This was awesome, thank you :)

    • @derekbanas
      @derekbanas  8 років тому +1

      +Mal1iGnant Thank you :) Your welcome

  • @krishnakvideo681
    @krishnakvideo681 2 роки тому

    Excellent Tutorial Derek,
    Could you please share the UML Diagram also in your website , along with the code. It would be very helpful to review the UML Diagram along with the code

  • @elbonkadillo
    @elbonkadillo 7 років тому

    @Derek Banas could you make a tutorial about the application controller pattern? Like for example creating a calculator and adding default operations, like multiply, divide, add and subtract two numbers. Great tutorials btw. Cheers

  • @MusicalSawMen
    @MusicalSawMen 12 років тому

    Derek for president !

  • @pushkarajpatil4787
    @pushkarajpatil4787 8 років тому

    Hello Derek,
    Thank you for this video...
    In video, I can see that, in one of "if" condition (customerWantsCondiments, in Hoagie class, makeSandwich() function) you are calling addVegetables(), still you are getting right output... how?????

  • @p.z.8355
    @p.z.8355 5 років тому

    can't you make addMeat, addCheese (and so on..) methods non-abstract, so they can be inherited ? Since they do the same thing in ItalianHoagie and VegetarianHoagie.

  • @Anubis10110
    @Anubis10110 4 роки тому

    So Funny, Informative and Concise
    Thanks

  • @DeniseGraz
    @DeniseGraz 10 років тому

    Love your explanations!
    Very helpful for my Software Design assessment.
    Just need to learn now, how to draw this in UML ... -.-

    • @derekbanas
      @derekbanas  10 років тому

      DeniseX Thank you :) I have a UML tutorial on my UA-cam channel to help.

  • @inso4041
    @inso4041 4 роки тому

    I have some trouble figuring when to use template instead of strategy DP

  • @SRISHONLINE
    @SRISHONLINE 7 років тому

    +Derek Banas: we can also call the method "makeSandwich" on the respective type of object isn't it? (i mean italianObj and veggieObj directly, instead of keeping it as super class type, and calling). Template design wise, will not be any impact, right? Also, can you state, how is this different from the "Bridge pattern", seemed very similar, where the common code is move to one place and used..! please comment !!

  • @Kurchack
    @Kurchack 10 років тому

    I love your instructional videos. Thanks so much for doing them!
    There's one thing I don't get though:
    If you're just going to stub out a method in a Hoagie implementation, what's the point of checking things like, "if(customerWantsMeat())"? Since whether or not you make that check, calling a given method will still do what you want (e.g. for the VeggieHoagie, addMeat() will still not do anything). The same goes for the other Hoagies and methods; calling a method on a hoagie will do what you want it to because the Hoagie implementation will have to implement the corresponding method (if it is abstract).
    I guess what my question boils down to is, can you remove the redundant checks (e.g. "if(customerWantsMeat())") and still follow the Template Method Design Pattern?

    • @derekbanas
      @derekbanas  10 років тому

      Jameson Saunders Thank you :) Yes you are correct that they could be removed. I was just trying to demonstrate the pattern and the finished code isn't optimized. Sorry if that caused any confusion.

  • @venkataynb
    @venkataynb 8 років тому

    really great place to go through all patterns, I have one suggestion. it would be better if you can explain each example how it would have been without using specif pattern or at-least talk about them once after finished with example.

    • @derekbanas
      @derekbanas  8 років тому

      +Venkata sharma Y N B Thank you :) I hope to do the same with C++ soon and I'll try to do better.

  • @drakeb9093
    @drakeb9093 10 років тому

    Wouldn't it be better to have boolean instance variables in abstract hogie and a constructor cause if you forget to override then the default is always true

  • @mohgamalmoh1
    @mohgamalmoh1 3 роки тому

    Great tutorials , you helped me a lot
    i want to discuss something here, is there a violation to interface segregation principle here , i mean the empty bodies of the meat and cheese methods?
    and really thank you for your awesome tutorials

  • @true_podejrzany
    @true_podejrzany 9 років тому

    Just a thought: afterFirstCondiment thing seems to be over complicating code. It would be easier just to go to each method and at the end paste "System.out.println();"

  • @jochemcode4570
    @jochemcode4570 9 років тому +2

    Epic set of tutorials

    • @derekbanas
      @derekbanas  9 років тому

      +Jochem De Kruijf Thank you :)

  • @dfence1985
    @dfence1985 9 років тому

    Way too fast. Thank God youtube videos can be replayed. It's nice to see so many patterns in the same video series. GJ!

    • @derekbanas
      @derekbanas  9 років тому

      Mariano Giagante Thank you :) Sorry about the speed.

  • @PrashantGhimirePlus
    @PrashantGhimirePlus 9 років тому

    This guys is awesome !

    • @derekbanas
      @derekbanas  9 років тому

      Prashant Ghimire Thank you :) I do my best

  • @quentin1860
    @quentin1860 8 років тому

    Could you do a concrete sample project implementing all those design patterns ? It seems like they resolve very specific problems and I have a hard time seeing how it could refactor that much code.

    • @derekbanas
      @derekbanas  8 років тому

      I'll see if I can do more with design patterns. This tutorial is best used with the GOF book which goes into more detail amzn.to/1tvFfz4 This tutorial is meant to make the GOF book easier to understand

  • @ChandraSekhar-uz6kf
    @ChandraSekhar-uz6kf 6 років тому

    Could you please tell me where to add data validation for this.

  • @nincako
    @nincako 8 років тому

    since some classes may not need some methods inherited by abstract class like add meat why do you make it abstract?
    I have the same concern asked but not replied
    "I don't like having empty method implementations, is there any way around it with this pattern????"

    • @derekbanas
      @derekbanas  8 років тому

      It is just an example of the pattern. You don't have to implement it this way

    • @nincako
      @nincako 8 років тому

      i am saying this is either bad example or i didnt understand the mentaliyu of this pattern!

  • @jasminephilip7819
    @jasminephilip7819 5 років тому

    Why is the method not "public final" and just final?

  • @FloatingSunfish
    @FloatingSunfish 6 років тому +3

    You totally sound like Hoagie from Day of the Tentacle. XD

  • @bone854
    @bone854 8 років тому

    Should we us so many if statements? Is there different way?

    • @Ilyen12
      @Ilyen12 8 років тому

      You could use strategy pattern. Create an interface implement it as many times as there is if statements, put all of them in a list and iterate through them and calling the interface's method. In this case it is not so clean, but it is an alternative

  • @omairbhore
    @omairbhore 7 років тому

    Whoa! Are you from Philly ?

    • @derekbanas
      @derekbanas  7 років тому

      Pittsburgh

    • @omairbhore
      @omairbhore 7 років тому

      Awesome, I'm a student at Drexel University. Your videos have helped me a lot. All the way from basic Java to now Kotlin. Thank you.

    • @derekbanas
      @derekbanas  7 років тому

      That is great to hear :) I'm very happy I could be of help

  • @vjsisneros
    @vjsisneros 7 років тому

    Brillant Work!

  • @nayanamtanuj
    @nayanamtanuj 9 років тому

    Hello, Since we over rode and made the addMeat() an empty method. So anyways addMeat() will not do anything now in the VeggieHoagie. Then what is the benefit of having hooks and making it to false?

    • @markbatdorff8119
      @markbatdorff8119 9 років тому

      +Tanuj Nayanam
      I'm trying to understand this as well. I understand setting the customerWantsMeat to false, or making an empty addMeat method, but I do not understand why doing both is necessary (seems redundant unless I'm missing something).

  • @MrZeusBG
    @MrZeusBG 9 років тому

    Why don't we implement the methods like addMeat(), addCheese() in the abstract class with default values and then if we do not want to use them in the subclasses we just do not write them(because we will declare the boolean with false and they wont even be used) and if we want to use them we just override them ?

    • @WudyIncognito
      @WudyIncognito 8 років тому +1

      Well, you are right. In this example the similar implementation of the single functions seems like code duplication and unnecessary work. But the purpose of the video is to demonstrate the "Template Method Design Pattern", not to implement the example in an optimal way.
      And that template pattern, by definition, determines an algorithm-skeleton in the superclass with all the single steps of the algorithm and the order to execute those steps. -> To say, a big method which includes a list of small methods to execute. It then is the task of the subclasses to implement those steps (and yes, it should be a premise when using this pattern that those steps generally differentiate in their implementation. If a few steps are always the same you could also define them in the superclass, its not that strict :P)
      Additional this pattern works with hook-methods, which indicate if additional (optional) steps are executed or not. With this you can add additional functionality to your algorithm.

  • @123japanuser
    @123japanuser 12 років тому

    Fastest Finger First !!!!! GOLD yay
    Het is uitstekend
    es ist sehr gut
    il est excellent

  • @asmrao3824
    @asmrao3824 5 років тому

    im confused because I think by mistake when you coppied your Add vegetables code and turned that into customer want condiments inside it you never changed addVegetables() to addCondiments() but your output was correct LOL.

  • @Blaskillo
    @Blaskillo 3 роки тому

    Hi Derek, I love your videos.
    I thought that was not a good practise to force classes to override methods that they do not use at all, like the addMeat(); in VeggieHoagie. However, in this pattern this rule is not respected. Any comments?

  • @brianlaudrupchannel
    @brianlaudrupchannel 9 років тому

    I like this pattern

    • @derekbanas
      @derekbanas  9 років тому

      +billyblackburn87 It is pretty awesome :)

  • @wjrasmussen666
    @wjrasmussen666 11 років тому

    well done!

  • @lisandrochichi
    @lisandrochichi 9 років тому

    I hate when you zoom in and suddenly zoom out, great tutorial

    • @derekbanas
      @derekbanas  9 років тому

      +Lisandro Chichi Penzo Sorry about the zooming

  • @Kri38
    @Kri38 8 років тому

    you are good man

    • @derekbanas
      @derekbanas  8 років тому

      Thank you :) I do my best

  • @JonathanRodan
    @JonathanRodan 10 років тому

    Isn't it better to implement this pattern mixing it with the strategy pattern?
    I mean, using the hoagie definitions as delegates making the code more testable and editable on runtime.

    • @derekbanas
      @derekbanas  10 років тому

      Sure, but I wanted to focus on just one pattern so that it wasn't confusing. I get into the stuff you are talking about in the refactoring tutorial.

  • @gptgotjokes
    @gptgotjokes 12 років тому

    thanks!!!

  • @123japanuser
    @123japanuser 12 років тому

    God willing One day I will be able to learn SOAP/ REST/ Java/ Eclipse also.
    It gives me coldEST feet.
    WSDL is a VAMPIRE =(

  • @unlink1649
    @unlink1649 7 років тому

    Derek you're a fucking hero. thanks a bajillion

    • @derekbanas
      @derekbanas  7 років тому

      I'm happy I could help :)

  • @nuniezjorge
    @nuniezjorge 5 років тому

    4:27 why not? it sounds delicious

  • @kaylemaclou
    @kaylemaclou 10 років тому

    nice!

  • @ryklin1
    @ryklin1 7 років тому

    I would make one change... do not declare addMeat() as abstract. Instead implement in the base class as : addMeat() { } like that, along with addCheese() etc. By doing this, those subclasses like VeggieHoagie do not need to implement any of these functions and only those subclasses that do use these function can override them.

  • @Katie-rq7bv
    @Katie-rq7bv 7 років тому +1

    Neither tomatoes nor peppers are vegetables but the rest of the video was fine.

  • @KingMartinelli
    @KingMartinelli 9 років тому

    I have critics tho!
    Why does veggie hoagie have no cheese?