The Object-Oiented THOUGHT Process
Object-oriented program design thinking process
The Most Important - separates the interface and implementation,
1 Interface representative "implementation" function
2 Abstract thinking (do not involve specific areas, provide abstract levels)
3 Provide as little interface as possible
4 Initialize all properties in the constructor, which can be used to ensure that the program is in a stable state.
5 Design Guidance:
Appropriate analysis
Collecting requirements from the statement of system requirements
Determine the user interface (user interface)
Determine class
Determine the responsibility of the class
Determine the interaction between classes
Create a class to describe the system (formerly written to BlackJack can refer to see)
6 About inheritance and combination:
Do not inherit when the interface is not shared
7 About reuse: Use a contract (the interface of the developer comply with the interface), improve the abstract level (the original book about e-commerce)