Primary and secondary school mathematics examination paper automatically generating program --- pair programming analysis

Preface: complete primary and secondary school mathematics examination paper automatically generating program

Pair programming, the code analysis partner

 

Overall analysis:

The code is the basic realization of the project requirements in functions : login user information checked at the time of printing the required number of questions, check whether the repeated questions, the questions are stored in txt documents ( folders first with your name, sub-folder type of difficulty, and be able to name the topic and time of the document ), modify the user's type of difficulty also added to the same user multiple functions can be a problem.

 

Function tests:

1, command line, enter a user name and password, check whether correct. According to account type display, otherwise the system prompts an error message, re-enter your user name and password.

2. Once logged in, the system prompts, user input selection, the user manually enter the number of items.

3, the program generated according to the input matching title roll. A teacher of the same subject can not be repeated in the papers and papers that have been generated in the previous topic.

4, when logged in, the user needs to achieve switching function type options and make prompt, type system for the new settings will be out of question.

5, generated task will be saved in a special form, a folder for each account. Within the document title stored in a special format.

 

Page code runs as follows:

 

 

Results are as follows:

 

Disadvantages:

1 , the question function is not perfect, when switching difficulty for the high school, entitled some errors (any excess symbol), the question arises in the position judging section symbol.

2、在文本文档中出现了一些格式错误,题号出现了两次。

3、出题函数分难度等级(小学、初中、高中)写了三个函数有些过于冗余,函数体内主体大概一致,可以合并为一个函数减少冗余代码的数量,用更少的代码来实现同样的功能

 

优点:

1、运行界面指示通俗易懂,加入分割线使运行页面看起来美观,条理清晰。

2、在实现基本功能的基础上增加了对同一用户可以多次出题的功能。

3、语句书写规范,命名规范,注释简洁,代码块之间逻辑关系清晰,增强可读性、易维护性,减少有经验和无经验开发人员编程所需的脑力工作

Guess you like

Origin www.cnblogs.com/jiaojiao-wu/p/11550963.html