Decorator Design Pattern

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

КОМЕНТАРІ • 13

  • @nandyad
    @nandyad 4 місяці тому

    The best and the cleanest explanation... ❤

  • @AnupShah
    @AnupShah 3 роки тому +2

    Thanks for all your hard work. With due respect i would like to add a suggestion as you are giving example first and not continuing the same on code creates confusion

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

    very useful video. Thank you sir for the detailed video.

  • @noamyogev84
    @noamyogev84 5 років тому +1

    Thanks for the video. isn't CarDecorator should ONLY expose ICar interface?

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

    Thanks for the video. If I want to implement a new functionality like getting a DoubleOfferPrice functionality inheriting from OfferPrice class how will I implement this?

  • @RamzanAli-zc7nr
    @RamzanAli-zc7nr 7 років тому

    Nice video

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

    Nice video - But you call the Suzuki class and not the Hundai you have in your presentation - just info.
    Question - why are you making a variable from you interface - "private ICar car" - can anybody help?

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

    It will be great if you can discuss how we can replace Decorator Pattern with Builder Pattern.
    Thank you

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

    $250 for some ice cream?!

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

    public OfferPrice(ICar car) : base(car)
    {
    } why we have created this constructor

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

      In this case, both the base class and derived class have their own constructors, so the process is complicated because the constructors of both classes must be executed.
      To overcome this situation C# provides a keyword known as a base keyword.
      With the help of the base keyword, the derived class can call the constructor which is defined in its base class.
      Tip: When you have added a constructor with parameters in a base class, you have to add a constructor without parameters on your own -- such a constructor will not be created by default in this case.

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

    Sorry this was not very good, with all due respect, you did not make the Decorator pattern clear at all. the code never talked about Suzuki as a class, otherwise the code runs if you change Suzuki to Hyndai maybe it was from another video IDK. where are the layers? Decorator should be about layering, you talk about ice cream for 100$ a scoop but never implement the concept

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

    This is the first comment on this video.