Adapter Design Pattern in Java Theory

preview_player
Показать описание
Recommended Book :

Adapter Design Pattern Theory
This video contains theory session of Adapter Design Pattern.
Adapter design pattern belongs to Creational design pattern which belongs to Design Patterns in java.
The adapter pattern converts the interface of a class into another interface the clients expects.
Adapter allows to reuse existing coding without changing it, as the adapter ensures the conversion between the different interfaces.

Check out our courses:

Coupon: TELUSKO10 (10% Discount)

Coupon: TELUSKO10 (10% Discount)

Coupon: TELUSKO20 (20% Discount)

Subscribe to the channel and learn Programming in easy way.

Рекомендации по теме
Комментарии
Автор

Thanks so much !! i'm asked same example in interview and i answered got selected....

SajanKumar-zbpr
Автор

1. You might be unable to change PilotPen(3rd party library case or an old class that is used by other teams etc.)
2. You want to use dependency injection. So when the available Pen type changes for some reason, you won't have to change AssignmentWork class. Also see open-closed principle.
3. AssignmentWork won't depend on PilotPen this way, so you can remove it from your project easily.
4. If PilotPen gets changed, you will only need to change PilotPenAdapter class.

onatkorucu
Автор

Holy crap. This must be the best explanation on this topic I've ever seen. I had like a mini eureka moment at the climax of the video, esp. during the pilot pen part. SUBSCRiBED.

abishekraju
Автор

i like this real world example of pen, assignment . thanks for this video .

AshokYadav-nptn
Автор

So we’ll explained, please create videos for other design patterns too!!

harshgupta
Автор

but cant we just initiliaze Pilot pen writeAssigment method ??

DagestanShop
Автор

Thanks for this tutorial. This is the best tutorial I've got on youtube. It explains very important and tough design pattern in easy steps.

eknathtake
Автор

So you could also say it maps methods with different signatures that provide the same logic onto each other?

mixolt
Автор

Can we make a standard or generic adapter pattern interface for multiple use case.

mishrajitendra
Автор

Am I the only one who hears "welcome back idiots" at the beginning? 00:00

zilaxion
Автор

I don't get the proper concept like how I would able to use in realtime.sir could you please explain using another example

sairawadwa
Автор

I don't understand why just simply not use PilotPen in class Assignment Work instead of using Pen interface in class Assingment Work? Or why just not make and interface with default method write and let class PilotPen implement it and AssigmentWork implement it too.

wBacz
Автор

Sir, can you share the Repo of all this.... Design Pattern Lectures...

harshverm
Автор

i am searching for all design pattern tutorial from you. If you can you give me the link?

RaushanKumar-cowj
Автор

The explanation is good however what I don't understand is why do we need a Pen Adapator itself. In the hardware world it makes sense that you repurpose the same charger. Thus you don't have to buy a new one. But why in the software world why not just directly use the pen instead of relying on this adapter thing ?

gauravupasani
Автор

Something seems to be missing here. Where is the original concrete implementation of Pen that the PilotPen needs to adapt to??!!

soho
Автор

why don't you make PilotPen implements Pen instead?

nincako
Автор

am I crazy or is this just sub-class with an override method? Why not just explain it that way?

mrchedda