Design and programming are all human activities. If you forget this, you will lose everything. -- Bjarme strousstup
This chapter is a Pair Programming (Pair Programming), an example of programming the bowling match scoring software.
In this processCode, Logic, design, and requirements are all incorrect, but the order is finally displayed.
★6.1 bowling match 66 pages
Summary of the conversation and code:
1. Confirm the verification test case.
2. Draw a UML class diagram.
3. Streamline the merge class diagram.
4. first use the simplest design, such as simple method parameters.
5. Whether to verify the input parameters is as follows: you do not need to verify the parameters you use. If the parameters are used by others, the verification is added. If you do not know, use the simplest method to handle the non-checksum.
6. design the relationship between classes. Adopts principles, models, and data structures.
7. continuous evolution of unit testing throughout.
8. Simplify classes for the purpose of passing unit tests.
9. refactoring during the compilation process.
10. Top-Down, test-first design. This avoids excessive design.
★6.2 Conclusion 102 page
For object-oriented design: we are not every application, everyProgramObject-oriented design is required. Excessive use of object-oriented processing increases unnecessary complexity.
For UML: There is no mistake in drawing a picture to explore ideas. The wrong thing is to assume that a graph is the best design. The best design is to write tests first, which is formed in a small step forward.
★SlS: This chapter summarizes the process of designing and writing a very artistic system.