+ 1

is this correct implementation of adapter pattern?

Hi Tried implementing adapter design pattern using object adaption through composition. https://www.sololearn.com/compiler-playground/c3dHtA4xwQH7 Please share your view on this implementation. Looking forward to your feedback to make it better in terms of design and performance. https://code.sololearn.com/c3dHtA4xwQH7/?ref=app

18th Sep 2023, 8:30 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
5 Réponses
+ 3
Ketan Lalcheta This is questions answer discussion forum. For feedback use `feed/post`section..
18th Sep 2023, 9:01 AM
Darpan kesharwani🇮🇳[Inactive📚]
Darpan kesharwani🇮🇳[Inactive📚] - avatar
+ 2
Ketan Lalcheta link is not clickable
18th Sep 2023, 8:34 AM
JAY
JAY - avatar
+ 1
Try now
18th Sep 2023, 8:40 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
yes, your implementation align with the adapter pattern allowing objects with incompatible interfaces to work together through composition and adaptation. for performance always keep in mind performance optimisation would typically involve profiling and identifying bottlenecks, but ur code doesn't seem to have any issue. for code readability, I would suggest you add more comments, cuz a lot of people here still learning from courses, community, and you as well, and most of them will not get your point,,. Other thing, maybe to write some posts in the feed section about design patterns, hoping to inspire someone🙂✌️
18th Sep 2023, 4:00 PM
Amine Laaboudi
Amine Laaboudi - avatar
+ 1
Thanks Amine Laaboudi . Got your point .
18th Sep 2023, 4:46 PM
Ketan Lalcheta
Ketan Lalcheta - avatar