How to create a class that “extends” two existing concrete classes

后端 未结 8 2033
悲哀的现实
悲哀的现实 2020-12-19 20:36

I very well know that it can be done with the help of interfaces and i have done it many times. But this time my situation is quite difference. I have class A ,

8条回答
  •  执笔经年
    2020-12-19 21:36

    http://en.wikipedia.org/wiki/Adapter_pattern

    Your problem is solved by the adapter pattern. I went back to check the wiki document, just to be sure :)

提交回复
热议问题