Software engineering - team work three

First, code style specification

  The main provisions of the text is, seemingly superficial, in fact, very important.

  Principles of the code style is: simple, easy to read, goes for the opposite sex.

1.1 indentation

       Tab key will display different lengths, seriously interfere with the reading experience, in different circumstances 4 from the spaces from the readability is just.

1.2 line width

       Modern line width is limited to 100 characters .

1.3 parentheses

       In complex conditional expressions in parentheses clearly represents a logical priority .

1.4 broken line with blank {} OK

Such as: IF (for condition Condition) {

    DoSomething();

  }

  else{

    DoSomethingElse();

  }

1.5 Branch

       Do not put more than one statement on a single line , strictly speaking, do not put more than one variable defined on a single line.

1.6 Naming

  1. Not mention the type described in terms of grammar or other variable names .
  2. Avoid too much description .
  3. If the information available from the context, such information need not be written in the variable name .
  4. Avoid qualifiers can not happen .

1.7 Underline

       Underlined for labels and variables scope of variable names separated semantics , such as: a member variable is usually m_ expressed, or simply to do with an underscore prefix.

1.8 case

       Variable name consists of multiple words , if all lowercase, very easy to read, a simple solution is to use case sensitivity .

1.9 Notes

1.  Notes should be simple and clear

2. The  side edges comments write code, modify the code at the same time modify the notes, in order to ensure consistency with the annotated code.

3.  Where necessary annotations, to moderate volume. The content of comments to make it clear, clear, precise meaning, to prevent ambiguity comment. Notes held adjacent thereto description code, i.e., annotations proximity principle.

4.  Note that the code should be placed adjacent to the top position, not at the bottom.

The  annotation of the data structure should be placed adjacent to its upper position, can not be placed below; annotations to the structure of each field should be placed to the right of this domain; Note the same structure to align different domains.

6.  variables, constants should be placed above it notes or rightward adjacent positions.

7. The  global variables to have more detailed annotations, including its function, the range, in which it functions or procedures and precautions access accessing FIG.

Two ,  the code design specifications

  General principles involved in all aspects of programming, the connection between the module design mode.

2.1 Functions

  The most important one rule: only one thing, and to do well .

2.2  goto

  Function best with a single outlet, in order to achieve this purpose, you can use GOTO .

2.3 Error Handling

  When the main functions of the program implementation, some programmers only need to be optimistic that the additional 20% of the time, add some error handling to the code and you're done, but that 20% of all project work often requires 80% of the time.

 

Third, the project ER diagram

 

Fourth, the project functional flow

(1) to start the game screen -> Click to start the game -> enter the game

(2) in the game interface, there are three buttons below the screen, stone scissors cloth, random enemy punches from top to bottom out, players have three opportunities for error, error ended game three times, the interface will jump again

(3) restart game interface -> click again -> back to start the game interface

 

Fives. The main contribution of the division of labor and division

 

Full name Division of work Contribution points
Yi Jie Responsible for game development 10
Ma Yan The game interface is responsible for landscaping 10
Su Hang The game is mainly responsible for commissioning 10
  Zhaohai Rui The game is mainly responsible for commissioning 10

    

 

 

Guess you like

Origin www.cnblogs.com/yijie123/p/10962978.html