Java software development learning notes (3)

xiaoxiao2021-03-06  15

1. Noun new solution abstraction: hidden in detail, concentration focus on the intrinsic issues: Some interface features are locally

2. In the case where the parameters to keep the method are constant, it is best to use Final modifiers.

3. The parameters of the method should be kept as short as possible. Unless it is absolutely necessary, a general habit is to use no more than 6 to 8 parameters, otherwise it will generate a prayed code and it is difficult to understand

4. One of the Method Design Principles: Each method should be cohesive. - That is, it should focus on this principle based on this principle, and the main method initializes the program by creating an object, while calling additional methods to handle other things. The method should be kept as short as possible. Decompose large and complex design issues into small components, which is easier to design. Each component defines an interface to connect to other components. The interface is the name and parameter list of the method, that is, the number and type of the parameters. After the interface is determined, it is to determine how the method and its role can be designed in turn - "The program is composed of many ways to be called in order to each other. A complete process of a program design: 1. Problem Description II, Design and Implementation Design Policy: Find the algorithm for solving the main problems, and then assign a behavior to the method: You should focus on the consideration and research algorithm should carefully determine the behavior, and specify Methods Use the J2SDK document to find many types of land classes and methods to pay attention to some principles: internal polymetics, etc. I have to have test plans and test logs. Review to see if there are different implementations, or have better design Structure, repeated processes are both simple procedures, and to develop good habits 7. Design and build a basic policy of the full program: process decomposition or auto-down refinement (for procedural design or large-scale object-oriented program, each small part of the large-oriented program) 1. Take the entire program 2, this top-level process can Defined as the call to other processes, these processes can be defined as other processes, and finally create a process hierarchy three, continue this step, until the process set does not need further decomposition, completely The basic statement of the language is constituted. Try to reduce the scope of the variable

转载请注明原文地址:https://www.9cbs.com/read-44839.html

New Post(0)