Knowledge
Design pattern: adapter
Check yourself
Q:

What is difference between patterns decorator and adapter?

{ "id": "a1rqz4tTIfiuIOgdQt5Lm3ih", "question": "What is difference between patterns decorator and adapter?", "answers": [ "Decorator and adapter are the same pattern", "Decorator changes behavior, but not interface. Adatper changes interface, but not behavior", "Decorator add behavior for existing class and adapter defines a family of algorithms, put each of them into a separate class, and make their objects interchangeable." ], "correctAnswers": [ "Decorator changes behavior, but not interface. Adatper changes interface, but not behavior" ], "incorrectAnswers": [ "Decorator and adapter are the same pattern", "Decorator add behavior for existing class and adapter defines a family of algorithms, put each of them into a separate class, and make their objects interchangeable." ], "allowCustomAnswer": false, "canEdit": false, "allowFileAnswer": false, "multi": false, "explanation": "", "canLike": false, "likes": 0, "allAnswers": [ { "text": "Decorator add behavior for existing class and adapter defines a family of algorithms, put each of them into a separate class, and make their objects interchangeable.", "correct": false, "selected": false }, { "text": "Decorator and adapter are the same pattern", "correct": false, "selected": false }, { "text": "Decorator changes behavior, but not interface. Adatper changes interface, but not behavior", "correct": true, "selected": false } ] }
Skillsets
Skillset PHP Developer preview
image descriptionPHP Developer
by Infinite Education
2566 users
Skillset Skyeng Senior Backend Developer preview
image descriptionSkyeng Senior Backend Developer
by Artem Naumenko (slack2)
39 users
Skillset Skyeng QA Automation Hard Skillset v09.21 preview
image descriptionSkyeng QA Automation Hard Skillset v09.21
by Aleksandra Kulikova
16 users
Skillset Skyeng SRE preview
image descriptionSkyeng SRE
by Yuliya Marochkina
12 users
Skillset Skyeng Senior PlatOps preview
image descriptionSkyeng Senior PlatOps
by Artem Naumenko (slack2)
7 users
Skillset Skyeng Senior Full Stack Developer preview
image descriptionSkyeng Senior Full Stack Developer
by Denis Solyakin
4 users
Show more
Do you know that ...?
Any useful or interesting facts about the skill. Any peace of information would be useful