|
|
|
@ -304,15 +304,40 @@ a: No such file or directory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
各模块的主要功能如下:
|
|
|
|
|
|
|
|
|
|
#### main
|
|
|
|
|
|
|
|
|
|
系统主函数模块,显示菜单,根据用户选择的菜单命令,执行相关操作。
|
|
|
|
|
|
|
|
|
|
#### init
|
|
|
|
|
|
|
|
|
|
系统初始化。
|
|
|
|
|
|
|
|
|
|
#### display_menu
|
|
|
|
|
|
|
|
|
|
显示菜单命令。
|
|
|
|
|
|
|
|
|
|
## 详细设计
|
|
|
|
|
|
|
|
|
|
针对概要设计
|
|
|
|
|
|
|
|
|
|
#### main
|
|
|
|
|
|
|
|
|
|
伪代码:
|
|
|
|
|
```
|
|
|
|
|
Step 1: 初始化
|
|
|
|
|
Step 2: 根据用户选择的命令执行对应的操作
|
|
|
|
|
Step 2.1: 显示菜单
|
|
|
|
|
Step 2.2: 选择菜单命令 c
|
|
|
|
|
Step 2.3: if c == CMD_READ then 读取数据
|
|
|
|
|
Step 2.4: if c == CMD_SAVE then 保存数据
|
|
|
|
|
Step 2.5: if c == CMD_PRINT then 打印数据
|
|
|
|
|
Step 2.6: if c == CMD_QUERY then 查询数据
|
|
|
|
|
Step 2.7: if c == CMD_ADD then 添加数据
|
|
|
|
|
Step 2.8: if c == CMD_UPDATE then 修改数据
|
|
|
|
|
Step 2.9: if c == CMD_DELETE then 删除数据
|
|
|
|
|
Step 2.10: if c == CMD_SORT then 排序数据
|
|
|
|
|
Step 2.11: if c == CMD_MAKE then 显示图表
|
|
|
|
|
Step 2.12: if c == CMD_QUIT then 退出
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
流程图:
|
|
|
|
|
|
|
|
|
|
![](pictures/main_chart.drawio.svg)
|
|
|
|
|