结对作业
Info | Detail |
---|---|
成员 | 3123004367(王文灏) / 3123004432(蔡伯权) |
作业要求 | [作业要求链接] |
仓库链接 | [Github仓库传送门] |
PSP2.1 | Personal Software Process Stages | 预估耗时(分钟) | 实际耗时(分钟) |
---|---|---|---|
Planning | 计划 | ||
· Estimate | 估计这个任务需要多少时间 | 50 | 55 |
Development | 开发 | ||
· Analysis | 需求分析 (包括学习新技术) | 15 | 20 |
· Design Spec | 生成设计文档 | 15 | 20 |
· Design Review | 设计复审 | 20 | 20 |
· Coding Standard | 代码规范 (为目前的开发制定合适的规范) | 10 | 5 |
· Design | 具体设计 | 45 | 50 |
· Coding | 具体编码 | 60 | 55 |
· Code Review | 代码复审 | 15 | 10 |
· Test | 测试(自我测试,修改代码,提交修改) | 30 | 40 |
Reporting | 报告 | ||
· Test Report | 测试报告 | 15 | 15 |
· Size Measurement | 计算工作量 | 10 | 10 |
· Postmortem & Process Improvement Plan | 事后总结, 并提出过程改进计划 | 10 | 15 |
Total | 合计 | 300 | 305 |
使用方法
main.py [-n N] [-r R] [-e E] [-a A]
程序流程
│ main.py # 程序入口
│
├─core
│ │ generator.py # 表达式生成(generate_expression, generate_number)
│ │ parser.py # 表达式解析(Parser, parse_expression, tokenize)
│ │ calculator.py # 表达式计算(evaluate)
│
├─utils
│ │ numbers.py # 数字处理(parse_number, format_number)
│ │ files.py # 文件操作(save_to_file, read_file)
│
├─services
│ │ checker.py # 答案校验(check_answers)
│
└─UniTest
│ test_generator.py
│ test_parser.py
│ test_calculator.py
│ test_checker.py
│ test_numbers.py
流程图
单元测试数据
实例测试及结果