Overall structure
The entire project we are divided by two of the most, one client, one server.
The client is divided into four parts, corresponding to four interfaces, to achieve the login selection to generate the topic calculation results and other functions
The server is responsible for receiving the information sent by the client, namely the account password
Client-specific structure
The client contains files as follows
Each of the. UI. H. CPP is a group, corresponding to each interface,. UI is the interface aspect of the design,. h is the declaration of a function variable, and CPP is the implementation of the function
According to the requirements of the project Client interface is login (registration) interface, after the completion of login and Registration client window will close, generate a new select window, the choice of difficulty and number of topics (this we set to 1-1000, input can only enter a number), after the completion of the input, Click OK to close this window and generate a new exam window, the implementation of the display title, statistical answer function, after clicking the hand-over button, the program will go to the fourth window, show the score, ask to continue or exit, if it is continued, then go back to the second window, if it is exit, close this window directly
The following is a design of four windows:
Structure of the server
The server has not designed too many functions, just using the socket plus QT design a button implementation of the server (here is a point, if you open the client before the server is started, is unable to connect to the server, The server must be opened before opening the client) data is stored in a TXT file under the current file (originally wanted to do the database, but think, do the database will not be able to hit the package ...) So choose to store in TXT format)
The use of pair programming to individual projects
For the entire pair programming project, our use of individual projects only generates the part of the topic, which could have been used for user classes, but was not added in consideration of the problem of account types and storage.
The thoughts of pairing programming
In fact, the national day of our two are very busy, mainly on-line communication, at present on my own and roommate's experience, a person to write code more efficient than two people, the first is psychological, everyone can be lazy lazy together when it is pushed, then separate words, others write code, More than 200 lines of basic is not very want to see (even if there is a comment), there is a problem is not so high analysis of requirements, before docking to give such an interface, may be found in the back of the need for other things, resulting in a bit of trouble in the middle of the change, and then we think about the problem is not the same angle and , my side of the symbol int 0 1 2 3 is represented, and his side of the Direct deposit char +-X/, also belong to the docking problem bar, always, feel this knot pair programming is very meaningful, can be said to the back of the team programming a cushion bar, now encountered problems may be noticed at the back of a point, Then I did self-taught a lot of things (Qt do UI ah socket link Ah, this thing should be the next semester of the class bar). In general, it is necessary to analyze the needs of a more comprehensive, more exchanges, division of labor, so as to be more effective, otherwise it is less.
Summary of Pairing programming