ABSTRACT Data Type:
Do you think of all classes in the program as abstract data types? Are their interfaces evaluated from this perspective?
Abstract:
Whether the class has a central purpose
Is the class name appropriate? Does its name express its central purpose?
Does the class interface display consistent abstraction?
Can a class interface clearly understand how to use it?
Is the class interface abstract enough so that you don't have to worry about how it implements its service? Can classes be viewed as black boxes?
Is the services provided by the class complete enough so that other classes do not need to use their internal data?
Has the irrelevant information been removed from the class?
Have you considered breaking classes into component classes? Has it been broken down as much as possible?
Does it maintain the integrity of its interface when modifying a class?
Encapsulation:
Minimize the accessibility of class members?
Do you want to avoid exposing data members in the class?
Has the class hidden its implementation details for other classes as much as possible?
Does the class avoid making assumptions about its users, including how its derived classes use it?
Does the class depend on other classes? Is it loosely coupled?
Inheritance:
Is Inheritance used to establish a "Yes/is a" relationship?
Whether the class document describes its inheritance Policy
Does a derived class avoid overwriting methods?
Do you want to put public interfaces, data, and actions in the inheritance level as high as possible?
Whether the inheritance level is too small
Are all data members in the base class defined as private rather than protected?
Other issues related to implementation
Is there only about 7 or fewer data members in the class?
Do you want to minimize the number of subprograms that call other classes directly or indirectly?
Does a class work with other classes only when absolutely necessary?
Are all data members initialized in the constructor?
For more information, see Code Daquan 2.