I recently read about Adapter pattern in my semester course. I have understood the concept of providing the common interface so that the third party APIs can work in our system.
But how does it will work in coding, lets say that i have two third party SDK, such as:
A(String name)
A1(String Firstname,String Lastname)
Now i produce the common interface called as, say, IAAdapater. And now write the code in that, now my question is, how does one call A(String name) or A1(String Firstname,String Lastname) through IAAdapater?
Correct me if I’m wrong!
Now you only have to worry about one API: firstname, lastname. The different adapters will handle the rest.
Please let me know if I misunderstood the question.