0

Is my Adapter pattern correct?

Please refer code below: https://code.sololearn.com/c6q3t646miJ9 Is my implementation correct? How to call display method from adapter class?

1st Mar 2022, 5:28 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
2 odpowiedzi
0
In that case , what benifit I am getting here ? I had X1 which I passed to the adapter and unnecessarily created adapter object. This object again calls display1 from X1 only.... What is benifit of adapter pattern ?
1st Mar 2022, 6:58 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Another concern is related to compatibility between two class... XML export and text export is not compatible with each other That's why I created adapter pattern. Now it makes it compatible as per the definition of adapter pattern , but how to make int and string conversation as both class has different data types for member variables
1st Mar 2022, 7:00 AM
Ketan Lalcheta
Ketan Lalcheta - avatar