This time the pair project I and the Wang Tianmi of our class is a group.
Modified based on my personal project.
The main work did to increase the difficulty of the choice of the keyboard to remove the bug changes, re-package the program, the most important is the program unit testing and measurement of code coverage.
The implementation of the difficulty selection is achieved by adding code that changes the generated topic, replacing the corresponding title length, bracket position, and number of points in the original program with a new variable, and creating a new window that requires the user to set up at the beginning of the program run.
Keyboard bug modification is mainly due to the individual project is not considered clear, in the case of the result may be negative, the keypad can not enter the negative sign, resulting in the problem can not be answered correctly, in the pair project was modified.
The re-encapsulation of the program, mainly on the issue of the generation of the program to modify, the original directly hanging in the main program to extract the code, make changes to join the difficulty selection, encapsulated into a separate class
The main thing is to test the program.
The test is divided into two parts, the test of the problem generating program and the test of the calculation function.
The test of the problem generator can only be done by altering the variables and generating a large number of questions and then checking for legality.
You can use JUnit for unit testing on computational functions.
I chose to use IDEA+JUNIT4 for unit testing, and by entering different topics, I checked to see if the calculation function would return the correct answer.
In the process of unit testing, the success of the discovery of a mistake, my program on the priority of Division sign error, resulting in errors in the calculation results, this is ignored in the manual test, and then successfully corrected.
Total carcass The main thing about this pair of projects is to learn the use of unit tests and JUnit test tools. And experience the end to the development
Summary of software engineering knot pair Project