Programming tasks: write programs for each module;
Results to be delivered in the programming stage: programs without syntax errors;
Good program: 1, Logically correct; 2Easy to read;
How to make the program readable?
Use spDetailed design of the method;
The program contains descriptive materials;
Good program writing format;
Programming style;
Select Programming Language:
Selected criteria:
The application field of the project; for example, it is best to compile a single-chip microcomputer;
Performance factors;
Algorithm and computing complexity;
Complexity of data structures;
Software execution environment;
The language and level that software developers are good;
SPMethods and Programming:
The basic spirit of structured methods is to gradually refine them from top to bottom;
Internal program documentation: It is actually a comment in the Code;
There are two types of Annotations:
1,Preface comment: it is placed at the beginning of the module. The content includes the description of module functions, interface description, usage and restrictions of some important variables, and development history, such as the author and reviewer, review date, modification date and description;
2,Descriptive comment: embedded in the program; Description of functionality and status;
Well, JDKThe Library Class in is a good example;
Note: The comment should be a comment on the statement segment, rather than a comment on each statement;
Methods to Improve program readability:
1,Comment;
2,Contraction method;
Programming style:
Simplicity is brilliant;
Program Efficiency:
Good data structures and algorithms;
Note: Do not corrupt the clarity of the program because of the low efficiency;