OOP vs macro problem

前端 未结 7 1330

I came across this problem via a colleague today. He had a design for a front end system which goes like this:

class LWindow
{
   //Interface for common meth         


        
7条回答
  •  情歌与酒
    2021-01-04 13:23

    LListBox and LComboBox should receive an instance of WindowsCommonImpl.

    In the first solution, inheritance is used so that LListBox and LComboBox can use some common methods. However, inheritance is not meant for this.

提交回复
热议问题