Adapter Design Pattern

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025

Комментарии • 287

  • @suman6327
    @suman6327 8 лет назад +64

    5 years old video and you r still one of the best when it comes to Java tutors on RUclips !!

  • @derekbanas
    @derekbanas  11 лет назад +9

    You're very welcome :) You're right about explaining this topic. I used to teach design patterns to all new programmers at a former employer. I always enjoyed it for some reason.

  • @JeanMaryBorgella87
    @JeanMaryBorgella87 9 лет назад

    Sir Derek, A cup of coffee isn't enough to thank you before your videos i was mediocre and now my teacher is telling how good i'm and i know it's your video's effect. I' m ending my bacc and everything become so easy for me. Thanks a lot.

    • @derekbanas
      @derekbanas  9 лет назад +1

      +Jean Mary Borgella Thank you for the nice compliment :) I'm glad that I could help, but your hard work is the reason why you are succeeding!

  • @derekbanas
    @derekbanas  11 лет назад +1

    I'm very happy to hear that I was able to help. You're very welcome

  • @thtblondasianchick1498
    @thtblondasianchick1498 2 года назад

    This is the most clearly articulated explanation of the adaptor pattern I have ever heard. Thank you

  • @MrGQ
    @MrGQ 8 лет назад

    Almost every time I need a tutorial on CS related topics, I find one of your videos. I am immediately relived since you are a master, and provide the information in a pristine manner. Thank you for all your time and help!

    • @derekbanas
      @derekbanas  8 лет назад +1

      +Cristobal Gallegos Thank you very much for the nice compliment :)

  • @BlueOwl2024
    @BlueOwl2024 3 года назад +1

    After 9 years, this video is still the best.

  • @hunterw287
    @hunterw287 5 лет назад +3

    Dude, you are a godsend. Clean, easy to understand implementation. Helped so much with a project I had for school

    • @derekbanas
      @derekbanas  5 лет назад +1

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

  • @goddardpk
    @goddardpk 11 лет назад

    Considering that you have probably explained this hundreds of times, it must be hard not to sound a little like a tour guide. However, thanks for making the effort to share and do such a great job!

  • @evgeniys3269
    @evgeniys3269 10 лет назад +3

    Thank you, it took me an hour and 10 tutorials to make me even more confused. your tutorial was great, I understood everything in 10 minutes. That is Y I also subscribed.

    • @derekbanas
      @derekbanas  10 лет назад +1

      Jack J You're very welcome :) I'm glad that I could help.

  • @Besiktas7Bjk7
    @Besiktas7Bjk7 7 лет назад +2

    This "Like or Hate?" note, which appears in the bottom at some time is just perfect for youtube videos. You make sure to show us a way we can support you if we liked it, but don't waste precious explenation time for that. When ever someone says in the middle of the video "If u liked this video..." I instantly hate this guy. Well done on that one. I always like when i see it.

    • @derekbanas
      @derekbanas  7 лет назад +2

      Thank you very much :) I do my best to not irritate people

  • @Popexssj
    @Popexssj 8 лет назад

    You saved my life with your videos. I am totally going to pass my data structures exam tomorrow! And it's all thanks to your videos about patterns!!! *THANKS*!!!

    • @derekbanas
      @derekbanas  8 лет назад +1

      +Popexssj I'm very happy I could help :) Best of luck on your exam

    • @Popexssj
      @Popexssj 8 лет назад +1

      +Derek Banas I just came back from the exam. Thanks to your videos I completely destroyed it and answered all the questions in detail and I am so excited!!! I checked my answers after the exam (they allowed us to keep the question paper) and I am aiming at high 80% or even possibly 90%!!! Again, thank you so much! :)

    • @derekbanas
      @derekbanas  8 лет назад +1

      +Popexssj Great Job! I'm glad I could help :)

  • @ancientneophyte8322
    @ancientneophyte8322 8 лет назад

    Derek - You've made this and the other patterns accessible by mortals. Thanks ever so much!

    • @derekbanas
      @derekbanas  8 лет назад +1

      Thank you :) I'm happy I could help

  • @AlexandreSilva-io6lb
    @AlexandreSilva-io6lb 11 лет назад

    i'm glad i started looking for design patterns on youtube! This comes in really handy right now, thanks Derek Banas for the great videos!

    • @AlexandreSilva-io6lb
      @AlexandreSilva-io6lb 11 лет назад

      Sorry Derek, I forgot to ask.. what would be the difference if this was implemented with class adapter ? Would the adaptee EnemyRobot mandatorily be an interface or could it be just a class ?

    • @derekbanas
      @derekbanas  11 лет назад

      I'm sorry, but I'm not understanding the question. Can you give me an example on what you are trying to create?

    • @AlexandreSilva-io6lb
      @AlexandreSilva-io6lb 11 лет назад

      Derek Banas First of all thanks for the answer ,I'm just studying for a test not really developing :/ My question is due to the class Adapter, there are class Adapter and object Adapter right ? This example was on object adapter, what would be the differences if we used class Adapter instead ? using multiple inheritance on the Adapter instead of object composition..

    • @derekbanas
      @derekbanas  11 лет назад

      Alexandre Silva I'm using composition here because Java doesn't allow for multiple inheritance. I normally default to composition, but that may be because I prefer to use Java over other languages for this type of stuff.

  • @derekbanas
    @derekbanas  12 лет назад

    You're very welcome :) I'm very happy to have been of help!

  • @Mejj
    @Mejj 4 года назад

    8 years old and also still one of the best java Lesson about Adapter I found.

  • @jo3ypx
    @jo3ypx 4 года назад +2

    You seem so comfortable with design patterns, I wish I had that confidence with them because I absolutely hate this and I've been struggling to learn them for years...

    • @derekbanas
      @derekbanas  4 года назад

      Please ask any questions that you have and I'll try to help

  • @derekbanas
    @derekbanas  12 лет назад

    Your very welcome :) Have you seen Java Video Tutorial 44, 45, and 46. You can also parse xml with JavaScript and PHP to say the least. I haven't covered that yet I don't think. I plan on redoing the PHP tutorial some day so that it is as good as my java tutorial

  • @derekbanas
    @derekbanas  11 лет назад +15

    "I promise I'm not a robot" - Skynet

  • @KatrinaFishman
    @KatrinaFishman 12 лет назад

    I don't know why people don't like this, this is great!

  • @derekbanas
    @derekbanas  12 лет назад

    You're very welcome :) I'm glad you are enjoying them

  • @derekbanas
    @derekbanas  12 лет назад

    Great! If you can use design patterns that will make you stand out from most programmers

  • @derekbanas
    @derekbanas  11 лет назад

    Thank you :) I can promise you that I don't mean to sound condescending. My allergies were probably acting up at the time I made this video. Sorry about that

  • @derekbanas
    @derekbanas  12 лет назад

    I'm going to upload an MVC tutorial in a few hours. It should clear everything up. If not, feel free to ask me questions

  • @derekbanas
    @derekbanas  12 лет назад

    It is always better to use an interface to lower coupling. Many of the things you see in patterns are there to add future flexibility. Check out my refactoring and object oriented design tutorial to learn more

  • @derekbanas
    @derekbanas  12 лет назад

    Thank you very much :) It is just a very niche subject. Most programmers don't use design patterns.

  • @derekbanas
    @derekbanas  12 лет назад

    You you can emulate an Interface in JavaScript. You can also sort of implement oop in PHP, but it is kind of like attaching another wheel to a car just to say it is there. In some situations it can seem useful, but I haven't been persuaded to believe this functionality provides benefits near those of true oop languages. I'll explore the topic in depth soon. Thank you for the request :)

  • @AlberTesla1024
    @AlberTesla1024 5 месяцев назад

    Thank you so much, the explanation is so clear and concise along with the implementation. I will watch the whole playlist for learning design patterns.

  • @ryklin1
    @ryklin1 7 лет назад +2

    Hi Derek,
    To fully appreciate the advantages of this design pattern, I believe, it is best to declare the rx7Tank as an EnemyAttacker rather than EnemyTank. This way, the base pointer is the same for the robot and the tank.

  • @AlanMeile
    @AlanMeile 7 лет назад +2

    at last someone capable of explaining this pattern to me.. the robot story did the trick. Ty

  • @derekbanas
    @derekbanas  12 лет назад

    Which language are you referring to? PHP isn't an OOP language and no matter what people try to do I think it is a waste to turn it into one. I prefer to use languages for what they are good at. That is all an opinion though

  • @mitaanshuagarwal007
    @mitaanshuagarwal007 7 лет назад +42

    Software engineering is incomplete if you haven't spent hours on this channel.

    • @derekbanas
      @derekbanas  7 лет назад +4

      Thank you for the nice compliment :)

  • @derekbanas
    @derekbanas  11 лет назад +1

    Thank you :) Good luck on your test.

  • @NyihaNgotho
    @NyihaNgotho 11 лет назад

    I watched this right before my exam and it came!!!! THANK YOU

  • @derekbanas
    @derekbanas  11 лет назад

    I record the screen with camtasia 2. I edit with iMovie. That is basically it. I use cheap or free stuff

  • @AkhilKumar
    @AkhilKumar 10 лет назад +3

    I've got my DP xam tomorrow and completed watching all your DP videos today.....now i'm confident enough to face the test which would have been impossible without these sort of quick reference vid's.....and yet again, Thank you my LORD! :-P __/\__

    • @derekbanas
      @derekbanas  10 лет назад +1

      Best of luck on your test. I'm glad i could help :)

  • @benjaminayangbola1773
    @benjaminayangbola1773 4 года назад

    Hi Derek. There's something about how you make things look so simple. I'm going over the rest of your videos on design patterns. Many thanks.

    • @derekbanas
      @derekbanas  4 года назад

      Thank you very much :) I'm happy you enjoy them

  • @derekbanas
    @derekbanas  12 лет назад

    Thank you :) I'll do my best to get 2 more done in the next 2 days

  • @derekbanas
    @derekbanas  11 лет назад

    Thank you :) I'm glad you found it useful

  • @JonahNelson7
    @JonahNelson7 4 года назад

    Thanks. I understood the concept but just needed to see an implementation of it. This helped a lot

  • @derekbanas
    @derekbanas  11 лет назад

    Thank you :) I'm very happy to be able to help.

  • @Anton-dl7me
    @Anton-dl7me 9 лет назад +95

    Caught myself at a thought that narrator sounds like a robot himself))

    • @UmairAli
      @UmairAli 4 года назад

      Hahha nailed it :D

  • @arthurmee
    @arthurmee 12 лет назад

    Beautifully clear tutorial. Thanks Derek. I'm finding your tutorials so helpful.

  • @antarikshverma8999
    @antarikshverma8999 4 года назад

    Again it's awesome , clear and lucid explanation.

  • @pinkponyofprey1965
    @pinkponyofprey1965 7 лет назад

    Aaaawwww! I still have my old rx7 on my desk over theeeeere!i
    It's a Yamaha RX7 drum machine from the eighties ... built like a tank actually haha! :D
    And yeah! I've been doing PHP with OOP (kind of) for a while now and with a big pile of code I need to untangle this is the first pattern I check and the explanation is great but not what I need. I've seen this video series before more or less just dry watching it but now I need it and it makes more sense. I've 25 videos to rewatch ... * deep breath * ... cover me, I'm going in! :D

    • @derekbanas
      @derekbanas  7 лет назад +1

      That's funny :) I hope the series helps

  • @FritsvanDoorn
    @FritsvanDoorn 9 лет назад

    Hi Derek, I studied this wonderful video and then try to reproduce it by memory. At this point I was wondering how to make it to use and came up with a class that has an array of EnemyAttackers of which size is set by the constructor, a method to Add an Attacker, a method to walk all Attackers and a method to let all Attackers Shoot. Now this class has no interest in what it gets, either an EnemyTank or an EnemyRobotAdapter as both are EnemyAttackers with the same interface. Wow, it works. I named this class Game, made a tank and a robot and added them to the game. Now I call game.walk() and both walk. I call game.shoot() and both shoot. Thanks to the Adapter class and thanks to your wonderful super simple explanation of the Adapter Design Pattern. Thank you for long hours of programming fun.

    • @derekbanas
      @derekbanas  9 лет назад

      +Frits van Doorn That is awesome! I'm very happy that I could help :)

  • @pkhafeez1
    @pkhafeez1 12 лет назад

    Thanks Derek ! I quickly managed knowing design pattersn just a day b4 my interview :D

  • @johnsineath3633
    @johnsineath3633 6 лет назад

    What a great video on Design Patterns!

  • @chrisspencer6502
    @chrisspencer6502 5 лет назад

    thanks So much clearer and to the point than my lecturer Im not sure if he had slides and time to fill

  • @DracoEvolve
    @DracoEvolve 2 года назад

    These are fantastic and was so helpful. I am learning ALOT. quick question, what does void mean? i always see things like 'public void'

  • @gillianbc
    @gillianbc 6 лет назад

    I get it - nice simple explanation. The robot scenario worked well for me.

  • @WhyNotKevin
    @WhyNotKevin 11 лет назад

    Thanks Derek, helped a lot. Busy studying for mid year exams and my lecture slides were very vague. You cleared everything up perfectly. Subscribed ;-)

  • @fqwixhg
    @fqwixhg 10 лет назад

    These videos are great! Very straight forward and easy to understand, thank you so much!

    • @derekbanas
      @derekbanas  10 лет назад +1

      Eric Kavalec Thank you :) You're very welcome

  • @liquidpebbles
    @liquidpebbles 6 лет назад

    I love you Derek, you're the best

    • @derekbanas
      @derekbanas  6 лет назад

      Thank you :) You're very kind

  • @derekbanas
    @derekbanas  11 лет назад

    Thank you :) You're very welcome.

  • @jonathanandrei6411
    @jonathanandrei6411 4 года назад

    Still watching this in 2020, good video

  • @Desidesi12111
    @Desidesi12111 4 года назад

    Thanks Derek. Your videos are to the point and real useful. I would appreciate if you also mention when to use a particular design pattern with real world example. Thanks :)

  • @derekbanas
    @derekbanas  11 лет назад

    Thank you :) You're very welcome

  • @pcihazer20
    @pcihazer20 10 лет назад

    I appreciate this one and ALL your videos as well. THANKS SO MUCH!!!

  • @M2dScientist
    @M2dScientist 10 лет назад

    So easy to understand! Awesome work!

  • @scarlaticious
    @scarlaticious 8 лет назад

    Great video! I feel like I finally get it

    • @derekbanas
      @derekbanas  8 лет назад

      +scarlaticious Great I'm glad it helped :)

  • @derekbanas
    @derekbanas  11 лет назад

    Well the Office is getting cancelled so I needed the work :)

  • @megaton12
    @megaton12 12 лет назад

    Yes, those are precisely the languages I'm talking about (duck-typed, no support of interfaces). PHP, Ruby, especially Javascript. What if you wanted to use all these design patterns in Javascript, for example? Won't it not use interfaces, like almost of all these design patterns are using in your examples?

  • @JohnGosling0
    @JohnGosling0 11 лет назад

    I think something missing from most of these is some examples of "why?" As zebnat says it seems like the two classes should just be using a parent abstract method to inherit from. Examples of what sort of problems these patterns solve better than other means would be useful!

    • @derekbanas
      @derekbanas  11 лет назад +1

      I cover that more in my refactoring tutorials.

  • @krowdzilla4534
    @krowdzilla4534 6 лет назад

    I think that in the RobotAdapter "composition" with enemyRobot you should call it agregation, since you are not controling the instance of newRobot, but receiving in constructor.

  • @OvyIstrate
    @OvyIstrate 11 лет назад

    really nice , i'm so glad i found your videos they are very helpful , is so easy to understand , keep up the good work

    • @derekbanas
      @derekbanas  11 лет назад +1

      Thank you very much :) I'm happy that you enjoyed them. They were fun to make

  • @derekbanas
    @derekbanas  12 лет назад +1

    Thank you :)

  • @unactive95
    @unactive95 6 лет назад

    Thanks Alot! , my lecturer failed to explain this properly for 5 lessons

  • @moglimogify
    @moglimogify 5 лет назад

    Very clear explanation, thank you.

  • @123japanuser
    @123japanuser 12 лет назад

    Have to settle for the Bronze =( .
    But the tutorial is a GOLDEN hands down..............as ever

  • @mohammadsaif4508
    @mohammadsaif4508 9 лет назад

    Good job and great work done by you with no words from me .

    • @derekbanas
      @derekbanas  9 лет назад

      +Mohammad Saif Thank you :)

  • @datsonyan3499
    @datsonyan3499 6 лет назад

    this is a great tutorial and way of explaining this pattern. thanks

  • @shutanovac
    @shutanovac 9 лет назад

    I said once already that your Design pattern course is great. I just have one remark: even though you try to portray the practical use of these, it's still pretty made up. It would be useful to have a reference to some standard Java class(es) that implement a certain pattern. Those were my 2 cents. Thanks a bunch!

  • @MrToftheL
    @MrToftheL 4 года назад

    Thanks Derek. I might make my own example using different character classes in a fantasy game.

  • @crudhost
    @crudhost 9 лет назад

    Like always, thank you very much for the intuitive video. :)

    • @derekbanas
      @derekbanas  9 лет назад

      +crudhost You're very welcome :)

  • @imadouzoun
    @imadouzoun 6 лет назад

    Thank you for the clear explanation! I liked your style.

  • @MengJia73
    @MengJia73 11 лет назад

    Wow this is some really awesome tutorials!!!! Thanks you soooooo much!

    • @derekbanas
      @derekbanas  11 лет назад

      You're very welcome :) I'm glad you are finding them useful.

  • @AgnaldoC
    @AgnaldoC 11 лет назад

    You are awesome! Congrats! I understand you easy and I'm gonna have a great test today!

  • @36ravi36
    @36ravi36 12 лет назад

    thanks a lot sir, this helped a lot to my seminar.

  • @ashishbharg
    @ashishbharg 9 лет назад

    Very nice video. Can you also tell the difference between Class Adapter and Object Adapter with some explanation? Also when both kind of adapters should be used?

  • @klawenn01
    @klawenn01 4 года назад

    Thanks, great explanation! Helped a lot!

  • @SRISHONLINE
    @SRISHONLINE 7 лет назад

    I think, it could have been made more simple, by just mentioning that the adapter-pattern, kind of a mapping-class, where the interfaces (on one component) is mapped to available interfaces (of another component).
    - This serves, that changes in the interfaces, would have minimal change, all at one place. - And secondly, that the component-1 interface can be made more human-readable (use-case specific), even though it uses the underlying component-2 interfaces (which are more oriented towards core-functionality).
    What say @Derek Banas?

  • @acuti13
    @acuti13 12 лет назад

    Thanks, do you have any videos for delegate or MVC patterns? I'm using these to study for my midterm Monday :)

  • @chasenbettinger9651
    @chasenbettinger9651 8 лет назад

    What is the purpose of having the adapter? Is it because you could ultimately make different adapters for different platforms (i.e. tank, robot, jet)? Why wouldn't you just create classes for each different object and manipulate their components through getter and setter methods?

  • @guilhas98fcp
    @guilhas98fcp 6 лет назад

    This was extremly helpful. Thank you!

  • @sagartrehan6597
    @sagartrehan6597 10 лет назад

    Thanks very knowledgable. Very good work.

    • @derekbanas
      @derekbanas  10 лет назад

      Sagar Trehan Thank you very much :)

  • @SrikanthReddymalyala
    @SrikanthReddymalyala 10 лет назад

    Thanks Derek Very useful and feel so simple

    • @derekbanas
      @derekbanas  10 лет назад

      Srikanth Reddy You're very welcome :) That is the goal of every video.

  • @VishalDeshpandedotnet
    @VishalDeshpandedotnet 10 лет назад

    Hi Derek,
    It was really awesome..!
    I have one confusion regarding Wrapper class and Addapter Pattern. How they are differ from each other.
    because in both the cases we are hiding concrete implementation and creates wrappers around it.
    Thank You.

    • @zk1476
      @zk1476 10 лет назад

      Wrapper is about changing data types totally different thing.

    • @VishalDeshpandedotnet
      @VishalDeshpandedotnet 10 лет назад

      Thank You..!

  • @arsalanajmal
    @arsalanajmal 6 лет назад

    Awesome. Thank you for clear explanation

  • @aliwassouf
    @aliwassouf 10 лет назад

    great video man ... THANKS

    • @derekbanas
      @derekbanas  10 лет назад

      ali wassouf Thank you :) I'm glad you liked it

  • @thecuriousone12
    @thecuriousone12 10 лет назад

    Hi Derek. This may sound like a stupid question, but I wanted to ask you how were you able to create an EnemyRobot object in the EnemyRobotAdapter class, seeing as the class implements the EnemyAttacker interface? Sorry if this is a stupid question but I am new to Java and it is kind of confusing...

    • @derekbanas
      @derekbanas  10 лет назад

      UnspokenDesirexX Hi, There is no such thing as a stupid question :) The adapter being EnemyRobotAdapter, has a EnemyRobot defined in it. EnemyRobotAdapter implements EnemyAttacker since the EnemyRobot did not. It is then the job of the adapter to provide an alternative action for each method defined in EnemyAttacker. Does that help?

    • @thecuriousone12
      @thecuriousone12 10 лет назад

      Derek Banas Hi, thank you for your response :) Yes, I understand why the EnemyRobot is needed in the Adapter. However, I cannot understand how can you possible create it since there is no inheritance to talk about.. Or are we talking about composition?

    • @zk1476
      @zk1476 10 лет назад

      Because the enemy robot is in the same Java package and that class is also defined public thus you can create the object in the adapter class.

  • @francescolimberti7306
    @francescolimberti7306 2 года назад

    Thank you
    P.S. Your voice sounds a lot like Andy Bernard from The Office

    • @derekbanas
      @derekbanas  2 года назад +1

      You’re very welcome :) Everyone tells me that which I think is funny

  • @MaleficPlanet
    @MaleficPlanet 12 лет назад

    Do you have any plans on doing design pattern tutorials in other OOP languages? Some languages just cant natively handle class-based inheritance, for instance, so maybe things would look different..

  • @salyiohh
    @salyiohh 12 лет назад

    thank you for all your effort , i have a question regards xsl/xml toturials , how can i make xsl file deals with some dynamics data instead of static ones of xml file?
    thank you

  • @ltamas21
    @ltamas21 11 лет назад

    Hi Derek, maybe it is a silly question but would this work even if the EnemyRobot doesn't have for example the reactToHuman(String) method? So if the EnemyRobot doesn't have all of the required methods (just some of them) then the Adapter pattern is not suggested?

    • @derekbanas
      @derekbanas  11 лет назад

      The adapter pattern is there to insert new objects and methods into a system without forcing other objects to add new code. So when the enemy robot object is called instead of calling assign Driver which the enemy robot doesn't have, the adapter instead calls reactToHuman. Does that help?

    • @ltamas21
      @ltamas21 11 лет назад

      Thanks for your response. It is clear now :)

    • @derekbanas
      @derekbanas  11 лет назад

      I'm happy I could help

  • @johnnybatafljeska6368
    @johnnybatafljeska6368 7 лет назад

    Is it necessary for 'adaptee' methods to have the same return type, or even the same arguments?

  • @Jackorer
    @Jackorer 10 лет назад

    What if you have an extra enemy entity? Say you have EnemyAircraft. This has methods dropBomb(), flyForward(), assignPilot() (which for the sake of the example is different than assignDriver). How would you do that with the adapter?
    The adapter class then has 2 attributes: enemyRobot and enemyPlane, right? Do you then just drop enemyPlane.dropBomb() into the fireWeapon() method together with the enemyRobot.smashWithHands()? (etc etc)

    • @clyde34
      @clyde34 10 лет назад

      You make an adaptor just for the EnemyAircraft that accepts an EnemyAircraft and replaces the respective methods with the according ones.

    • @Jackorer
      @Jackorer 10 лет назад

      Oh so each class gets a seperate adapter?
      Thanks

    • @clyde34
      @clyde34 10 лет назад

      JayDeeBee Almost. Not every class, but every interface. If you have 5 classes that use interface InterfaceOne, and need to be adapted to InterfaceTwo, one adapter would suit them all.
      Given your example. Let's say you have flying and walking enemies:
      Flying enemies use the interface EnemyFlying with dropBomb, while walking enemies use EnemyWalking with smashWithHands.
      You make "EnemyAircraft implements EnemyFlying", "EnemyHelicopter implements EnemyFlying", "EnemyRobot implements EnemyWalking", "EnemyFootsoldier implements EnemyWalking".
      You would just need to make 2 adapters: EnemyFlying->EnemyEntity that converts dropBomb->fireWeapon and EnemyWalking->EnemyEntity that converts smashWithHands->fireWeapon.
      The Adapter patterns is very very ugly to explain in Java because it's the only major language with no form of Duck typing.

    • @Jackorer
      @Jackorer 10 лет назад

      AdnanClyde Ok. I meant every class with a different set of methods needs a different adapter, right? If EnemeyAircraft and EnemyHelicopter use different methods, they would need a different adapter, correct?

    • @clyde34
      @clyde34 10 лет назад

      JayDeeBee Yes

  • @QuantumPickleJar
    @QuantumPickleJar Год назад

    So is each instance of a EnemyRobot possessing an adapter , Or is one just static?

  • @eugenezuev7349
    @eugenezuev7349 4 месяца назад

    Well-explained. Thanks

  • @MariamaBK
    @MariamaBK 7 лет назад

    Hello, this video is very good and understandable but i still have a problem. I need to program a Java project for Uni to show what the usage of the Adapter Patter is and explain in a presentation what the difference is to the Bridge Pattern. The problem is i still dont get the difference between them two. Can you please explain it to me.