Improve software quality----consistency
Moakap
One important criterion in designing and writing programs is consistency. Consistency is when you have a set of functions, such as all the member functions of a class, and the design of function names and parameters should be consistent. This is also the beginning of good turning skills.
The simplest example, for example, is to design two member functions, respectively, to set the length and width of the rectangle. The function that sets the length we define as BOOL SetLength (float L);
So, to set the wide function we should not write the BOOL setw (float W); or bool Setwide (float W); Instead, you should keep the function name consistent and set to BOOL SetWidth (float W).
Similarly, this consistency criterion should be maintained for function parameters, return values, and so on.
In addition, consistency is not limited to functions, it also includes the naming of a set of related classes, the type of member functions, and so on. Following a consistent design program can greatly increase the readability and programming efficiency of the program.