Compare commits

..

No commits in common. 'master' and 'ee' have entirely different histories.
master ... ee

28
.vscode/tasks.json vendored

@ -1,28 +0,0 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc.exe 生成活动文件",
"command": "D:\\mingw64\\bin\\gcc.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。"
}
],
"version": "2.0.0"
}

BIN
1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

BIN
13.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
14.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

BIN
2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

BIN
3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

@ -8,7 +8,7 @@
本系统是程序设计与问题求解课程设计项目,是为教师提供管理班级成绩的工具,该系统可以实现的对学生的成绩进行增、删、改、查、信息保存和信息导入等基本功能,以及对学生成绩排序和分段的扩展功能,有利于对学生成绩管理。项目采用 C 语言编程实现,在 VS Code 集成开发环境IDE中用 GCC 进行编译。系统采用模块化设计,程序结构清晰,采用菜单驱动的命令行界面,操作便捷,能够用 CSV 格式读取和保存数据,通用性强,能够用图表展示数据,直观清楚。 本系统是程序设计与问题求解课程设计项目,是为教师提供管理班级成绩的工具,该系统可以实现的对学生的成绩进行增、删、改、查、信息保存和信息导入等基本功能,以及对学生成绩排序和分段的扩展功能,有利于对学生成绩管理。项目采用 C 语言编程实现,在 VS Code 集成开发环境IDE中用 GCC 进行编译。系统采用模块化设计,程序结构清晰,采用菜单驱动的命令行界面,操作便捷,能够用 CSV 格式读取和保存数据,通用性强,能够用图表展示数据,直观清楚。
下载地址https://code.educoder.net/plebkff6w/text3 下载地址https://code.educoder.net/plebkff6w/text3/tree
项目开发过程中采用 Kanban看板进行任务管理和分工协作并使用 Git 对程序代码和文档进行版 项目开发过程中采用 Kanban看板进行任务管理和分工协作并使用 Git 对程序代码和文档进行版
本管理。任务分工情况如下: 本管理。任务分工情况如下:
@ -16,25 +16,26 @@
| 任务 | 设计 | 开发 | 测试 | 文档 | | 任务 | 设计 | 开发 | 测试 | 文档 |
|---|---|---|---|---| |---|---|---|---|---|
| C1-C3 菜单驱动的用户界面 | 董函铄 | 董函铄 | 胡煜男 | 董函铄 | | C1-C3 菜单驱动的用户界面 | 董函铄 | 董函铄 | 胡煜男 | 董函铄 |
| C4 添加学生信息及成绩 | 胡煜男 | 胡煜男 | 于博 | 胡煜男 | | C4 添加库存记录 | 胡煜男 | 胡煜男 | 于博 | 胡煜男 |
| C5: 查询学生信息及成绩 | 于博 | 于博 | 袁楷昊 | 于博 | | C5: 查询库存记录 | 于博 | 于博 | 袁楷昊 | 于博 |
| C6: 打印学生信息及成绩 | 袁楷昊 | 袁楷昊 | 董函铄 | 袁楷昊 | | C6: 打印库存列表 | 袁楷昊 | 袁楷昊 | 董函铄 | 袁楷昊 |
| C7: 修改学生信息及成绩 | 董函铄 | 董函铄 | 于博 | 董函铄 | | C7: 修改库存记录 | 董函铄 | 董函铄 | 于博 | 董函铄 |
| C8: 删除学生信息及成绩 | 胡煜男 | 胡煜男 | 袁楷昊 | 胡煜男| | C8: 删除库存记录 | 胡煜男 | 胡煜男 | 袁楷昊 | 胡煜男|
| C9: 学生信息及成绩记录排序 | 于博 | 于博 | 董函铄 | 于博 | | C9: 库存记录排序 | 于博 | 于博 | 董函铄 | 于博 |
| C10: 从文件中读取学生信息及成绩记录 | 袁楷昊 | 袁楷昊 | 胡煜男 | 袁楷昊 | | C10: 从文件中读取库存记录 | 袁楷昊 | 袁楷昊 | 胡煜男 | 袁楷昊 |
| C11: 将学生信息及成绩保存保存到文件 | 董函铄 | 于博 | 胡煜男 | 董函铄 | | C11: 将库存保存保存到文件 | 董函铄 | 于博 | 胡煜男 | 董函铄 |
| C12: 以图表方式显示学生信息及成绩 | 董函铄 | 袁楷昊 | 于博 | 胡煜男 | | C12: 以图表方式显示库存记录 | 董函铄 | 袁楷昊 | 于博 | 胡煜男 |
每个成员的工作量(百分比): 每个成员的工作量(百分比):
| 董函铄 | 胡煜男 | 于博 | 袁楷昊 | | 董函铄 | 胡煜男 | 于博 | 袁楷昊 |
|---|---|---|---| |---|---|---|---|
| 30 | 20 | 30 | 20 | | 25 | 25 | 25 | 25 |
## 关于实现学生成绩管理系统 ## 关于实现学生成绩管理系统
设计一个学生成绩管理系统,要求采用命令行菜单界面进行交互,具备读取、保存、打印、查询、修改、插入、删除和排序等基本功能,能够以表格和图表形式展示数据,采用 CSV 格式保存数据。 设计一个学生成绩管理系统,要求采用命令行菜单界面进行交互,具备读取、保存、打印、查询、修
改、插入、删除和排序等基本功能,能够以表格和图表形式展示数据,采用 CSV 格式保存数据。
系统的功能性需求: 系统的功能性需求:
@ -53,7 +54,7 @@
命令行中执行命令 ./app , 系统启动,显示提示信息,然后显示功能菜单,等待用户输入命令。 命令行中执行命令 ./app , 系统启动,显示提示信息,然后显示功能菜单,等待用户输入命令。
``` ```
学生成绩管理系统启动 库存管理系统启动
1 读取 | 2 保存 | 3 打印 | 4 查询 | 5 添加 1 读取 | 2 保存 | 3 打印 | 4 查询 | 5 添加
6 修改 | 7 删除 | 8 排序 | 9 图表 | 0 退出 6 修改 | 7 删除 | 8 排序 | 9 图表 | 0 退出
@ -61,6 +62,7 @@
请选择: 请选择:
``` ```
#### C2显示命令菜单 #### C2显示命令菜单
``` ```
@ -70,6 +72,8 @@
请选择: 请选择:
``` ```
#### C3: 退出程序 #### C3: 退出程序
选择菜单命令 `0`,再输入 `y` 确认,则退出程序。 选择菜单命令 `0`,再输入 `y` 确认,则退出程序。
@ -79,27 +83,26 @@
确定要退出吗?(Y/N): y 确定要退出吗?(Y/N): y
程序退出 程序退出
``` ```
#### C4: 添加库存记录
#### C4: 添加学生信息及成绩 选择菜单命令 `5`,提示输入学号,若该学生不存在,则继续输入学号、姓名、成绩,添加学号,并提示完成;若学号已存在,则提示学号已存在,并结束。
选择菜单命令 `3`,提示输入学号,若该学生不存在,则继续输入学号、姓名、成绩,添加学号,并提示完成;若学号已存在,则提示学号已存在,并结束。
``` ```
请选择:3 请选择:5
输入学号102 输入学号101
输入姓名:小米 输入姓名:小米
输入成绩:70 输入成绩:80
学生 102 已添加 学生 101 已添加
1 读取 | 2 保存 | 3 打印 | 4 查询 | 5 添加 1 读取 | 2 保存 | 3 打印 | 4 查询 | 5 添加
6 修改 | 7 删除 | 8 排序 | 9 图表 | 0 退出 6 修改 | 7 删除 | 8 排序 | 9 图表 | 0 退出
请选择:3 请选择:5
输入学号102 输入学号101
学号已存在. 学号已存在.
``` ```
#### C5: 查询学生信息及成绩 #### C5: 查询库存记录
选择菜单命令 `4`,提示输入学号,若该学号存在,则输出学号、姓名、成绩;否则提示学生不存在并结束。 选择菜单命令 `4`,提示输入学号,若该学号存在,则输出学号、姓名、成绩;否则提示学生不存在并结束。
@ -114,12 +117,12 @@
6 修改 | 7 删除 | 8 排序 | 9 图表 | 0 退出 6 修改 | 7 删除 | 8 排序 | 9 图表 | 0 退出
请选择4 请选择4
输入学号101 输入学号100
学号不存在. 学号不存在.
``` ```
#### C6: 打印学生信息及成绩 #### C6: 打印库存列表
选择菜单命令 `3`,打印 选择菜单命令 `3`,打印
@ -128,14 +131,14 @@
------------------------------------------------------- -------------------------------------------------------
| NUMBER | NAME | ON HAND | | NUMBER | NAME | ON HAND |
------------------------------------------------------- -------------------------------------------------------
| 101 | 小 | 80 | | 101 | 小 | 80 |
------------------------------------------------------- -------------------------------------------------------
``` ```
#### C7: 修改学生信息及成绩 #### C7: 修改库存记录
选择菜单命令 `7`,根据提示输入学号,若学号存在,则继续输入学号、姓名、成绩,并修改库存记录;否则,提示学号不存在并结束。 选择菜单命令 `6`,根据提示输入学号,若学号存在,则继续输入学号、姓名、成绩,并修改库存记录;否则,提示学号不存在并结束。
``` ```
请选择7 请选择7
@ -151,19 +154,18 @@
------------------------------------------------------- -------------------------------------------------------
| NUMBER | NAME | ON HAND | | NUMBER | NAME | ON HAND |
------------------------------------------------------- -------------------------------------------------------
| 104 | 小刘 | 96 | | 104 | 小刘 | 90 |
------------------------------------------------------- -------------------------------------------------------
1 读取 | 2 保存 | 3 打印 | 4 查询 | 5 添加 1 读取 | 2 保存 | 3 打印 | 4 查询 | 5 添加
6 修改 | 7 删除 | 8 排序 | 9 图表 | 0 退出 6 修改 | 7 删除 | 8 排序 | 9 图表 | 0 退出
请选择:7 请选择:6
输入学号104 输入学号100
学生不存在. 学生不存在.
``` ```
#### C8: 删除库存记录
#### C8: 删除学生信息及成绩
选择菜单命令 `7`,根据提示输入学号,若学号存在,则删除之;否则提示学号不存在并结束。 选择菜单命令 `7`,根据提示输入学号,若学号存在,则删除之;否则提示学号不存在并结束。
@ -190,7 +192,7 @@
``` ```
#### C9: 学生信息及成绩排序 #### C9: 库存记录排序
选择菜单命令 `8`,对学生按学号从小到大排序。 选择菜单命令 `8`,对学生按学号从小到大排序。
@ -223,14 +225,14 @@
``` ```
#### C10: 从文件中读取学生信息及成绩 #### C10: 从文件中读取库存记录
选择菜单命令 `1`,提示输入文件名,若文件存在,则打开文件读取 CSV 格式保存的所有库存记录;否则,若文件不存在,则给出错误信息并结束。 选择菜单命令 `1`,提示输入文件名,若文件存在,则打开文件读取 CSV 格式保存的所有库存记录;否则,若文件不存在,则给出错误信息并结束。
假设文件 `a.csv` 中,以 CSV Comma-Separated Values格式保存了如下记录 假设文件 `a.csv` 中,以 CSV Comma-Separated Values格式保存了如下记录
``` ```
103,小,80 103,小,80
104,小光,100 104,小光,100
101,小米,80 101,小米,80
102,小明,70 102,小明,70
@ -251,7 +253,7 @@
------------------------------------------------------- -------------------------------------------------------
| NUMBER | NAME | ON HAND | | NUMBER | NAME | ON HAND |
------------------------------------------------------- -------------------------------------------------------
| 103 | 小 | 80 | | 103 | 小 | 80 |
| 104 | 小光 | 100 | | 104 | 小光 | 100 |
| 101 | 小米 | 80 | | 101 | 小米 | 80 |
| 102 | 小明 | 70 | | 102 | 小明 | 70 |
@ -267,7 +269,7 @@ a: No such file or directory
``` ```
#### C11: 将学生信息及成绩保存到文件 #### C11: 将库存保存保存到文件
选择菜单命令 `2`,提示输入文件名,将所有库存记录以 CSV 格式保存到指定的文件中。 选择菜单命令 `2`,提示输入文件名,将所有库存记录以 CSV 格式保存到指定的文件中。
@ -279,14 +281,14 @@ a: No such file or directory
``` ```
#### C12: 以图表方式显示学生信息及成绩 #### C12: 以图表方式显示库存记录
选择菜单命令 `9`,以图表方式显示库存记录。 选择菜单命令 `9`,以图表方式显示库存记录。
``` ```
请选择9 请选择9
图表 图表
103 : 小 | ******** (80) 103 : 小 | ******** (80)
104 : 小光 | ************ (100) 104 : 小光 | ************ (100)
101 : 小米 | ******************** (80) 101 : 小米 | ******************** (80)
102 : 小明 | ********** (70) 102 : 小明 | ********** (70)
@ -295,7 +297,6 @@ a: No such file or directory
6 修改 | 7 删除 | 8 排序 | 9 图表 | 0 退出 6 修改 | 7 删除 | 8 排序 | 9 图表 | 0 退出
``` ```
## 概要设计 ## 概要设计
系统主要分为用户界面和数据处理两大模块。 系统主要分为用户界面和数据处理两大模块。
@ -304,7 +305,19 @@ a: No such file or directory
上述各模块通过主程序main进行调用系统模块图如下。 上述各模块通过主程序main进行调用系统模块图如下。
![1](./1.png)
各模块的主要功能如下: 各模块的主要功能如下:
@ -320,6 +333,7 @@ a: No such file or directory
显示菜单命令。 显示菜单命令。
## 详细设计 ## 详细设计
针对概要设计 针对概要设计
@ -341,17 +355,7 @@ Step 2.10: if c == CMD_SORT then 排序数据
Step 2.11: if c == CMD_MAKE then 显示图表 Step 2.11: if c == CMD_MAKE then 显示图表
Step 2.12: if c == CMD_QUIT then 退出 Step 2.12: if c == CMD_QUIT then 退出
![cc9d4a3c669029521483c666695b97e](./cc9d4a3c669029521483c666695b97e.png)
#### read_data
Step 1: 输入文件名
Step 2: 打开文件
Step 3: if 文件为空 then 结束
Step 4: else 读取文件
Step 5: 提示读取并记录
![mmm](./mmm.png)
#### save_data #### save_data
@ -361,20 +365,8 @@ Step 3: if 打开文件失败 then 提示打开文件失败并结束
Step 4: 将所有库存记录写入文件 Step 4: 将所有库存记录写入文件
Step 5: 关闭文件 Step 5: 关闭文件
![save](./save.png)
#### print_data
Step 1: 输出学号、姓名、成绩
![print](./print.png)
#### query_data
Step 1: 输入学生学号
Step 2: if学号不存在 then 提示学生不存在并结束
Step 3: else 学号存在 then 输出学号、姓名、成绩
![query](./query.png)
#### add_data #### add_data
Step 1: if 数据库满 then 提示数据库满并结束 Step 1: if 数据库满 then 提示数据库满并结束
@ -383,35 +375,56 @@ Step 3: if 学生已存在 then 提示学生已存在并结束
Step 4: 输入学生名字和成绩 Step 4: 输入学生名字和成绩
Step 5: 添加学生到数据 Step 5: 添加学生到数据
Step 6: 提示添加成功 Step 6: 提示添加成功
![add](./add.png)
#### query_data
Step 1: 输入学生学号
Step 2: if学号不存在 then 提示学生不存在并结束
Step 3: else 学号存在 then 输出学号、姓名、成绩
#### print_data
Step 1: 输出学号、姓名、成绩
#### update_data #### update_data
Step 1: 输入学号 Step 1: 输入学号
Step 2: if 不存在 then 提示学生不存在并结束 Step 2: if 不存在 then 提示学生不存在并结束
Step 3: else 输入学号、姓名、成绩 Step 3: else 输入学号、姓名、成绩
Step 4: 已更新 Step 4: 已更新
![update](./updata.png)
#### delete_data #### delete_data
Step 1: 输入学号 Step 1: 输入学号
Step 2: if 不存在 then 提示学生不存在并结束 Step 2: if 不存在 then 提示学生不存在并结束
Step 3: else 删除学生信息 Step 3: else 删除学生信息
Step 4: 提示删除成功 Step 4: 提示删除成功
![delete](./delete.png)
#### read_data
Step 1: 输入文件名
Step 2: 打开文件
Step 3: if 文件为空 then 结束
Step 4: else 读取文件
Step 5: 提示读取并记录
#### sort_data #### sort_data
Step 1: 读取文件 Step 1: 读取文件
Step 2: 进行排序 Step 2: 进行排序
Step 3: 提示排序已完成 Step 3: 提示排序已完成
![2](./2.png)
#### make_chart
Step 1: 读取文件
Step 2: 显示图表
![3](./3.png)
#### confirm
Step 1: 输出 确定要退出吗
Step 2: if 确认 then 退出
![14](./14.png)
#### make_chart
Step 1: 读取文件
Step 2: 显示图表

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

@ -1,98 +0,0 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="351px" height="511px" viewBox="-0.5 -0.5 351 511" content="&lt;mxfile&gt;&lt;diagram id=&quot;dFwQAFuAnhvr7hr_DKj_&quot; name=&quot;Page-1&quot;&gt;7VhLc5swEP41OtYDiOfRduz00M5kxoe2R9XIQCMjKsux3V9fCUlYPJK6Dkmm0zAZR/uttBL7+BYAcL493jJU5Z9pignwnPQI4A3wPN/3xa8ETgoIElcBGStSBVnAqviFNehodF+keNeayCklvKja4JqWJV7zFoYYo4f2tA0l7V0rlOEesFoj0ke/FCnPFQqh45wVH3GR5XprP4z1ku9ofZ8xui/1hsCDm/pS6i0yxrSlXY5SerAguABwzijlarQ9zjGRvjV+U+uWj2ibgzNc8ksWeGrBAyJ7bE4cErF0tqHCgnQxoazWhD/38lQzcUtOfdlQmMn/Ih6bgm2NCbGtsqK0+o75ybhZHEVEVAizQ15wvKrQWmoOIqcElvMtEZIrz1IQMm8OApf1JfAdZ/QeWxp9MLOX7QftmgfMOD5akPbLLaZbzNlJTNFaqEOkc9jX4uGcEK6JYm7lQqQxpHMwawyfwyAGOhLDUYEDUen6rkynMtOFtCZotyvWbZfhY8G/irEzCbT0zdLcyHt0jHDSwhXu3NE9W+NWLnHEMmwKQ0E4bdVb3+WWU4MBnxqMYYJ48dCu0iFH6x3uaFEnsYl3J6QQdmKl7kavsqumYyhp23G7MVcu6Nmpw97c9UWZ4I9an2ARgngJxPEXEZj6YDatBy6YLsAikL+JQGIwFdNcsEhA7Mg/oYqjenIg1ybRpQUu2K2SQ5E4iBBMaMbQVkysMCuEEzDr6u7Oij9zwhGb1vFmHOF2EiEYIIlwIKHDEUgiGJMk/MC3aMKZJDF8kiqkYAVrDPrw+/QR/hf00cuG8egjHJk++oywBLM5SJbvjDDMCN4QI/gvxAjRyNFuWkMsf0W/eA+yjqrfYYKhKA89HI4R5fgC3heEudJiSUv5hE0Zz2lGS0Q+UVpp5/3AnJ+0M9Ge0053KMXJ9DNkZGTZHj44E0f1B4mcG0QtnWxphBZh94Po7/uB64xE/p2Qe1EyCa6jf9jpI158Gf+LVo5O1rRKTtg9fmTY5aK49S4oBsritc0luSAR/6k3vOQVq9jE5hXK+Io3wab0XbvutYUniv6Zj4BRv+STtyv5pneb/PCufN5rvhuZz2H+CxV8dx/vWQUvxPOHKDX9/LUPLn4D&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(255, 255, 255);">
<defs/>
<g>
<ellipse cx="80" cy="35" rx="60" ry="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 35px; margin-left: 21px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<font color="#000000">
confirm
</font>
</div>
</div>
</div>
</foreignObject>
<text x="80" y="39" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
confirm
</text>
</switch>
</g>
<path d="M 80 70 L 80 103.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 80 108.88 L 76.5 101.88 L 80 103.63 L 83.5 101.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 0 170 L 20 110 L 160 110 L 140 170 Z" fill="#ffffff" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 140px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<font color="#000000">
提示确定要退出吗
</font>
</div>
</div>
</div>
</foreignObject>
<text x="80" y="144" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
提示确定要退出吗
</text>
</switch>
</g>
<path d="M 72.64 168.98 L 71.35 203.64" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 71.16 208.88 L 67.92 201.76 L 71.35 203.64 L 74.91 202.02 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 0 270 L 20 210 L 140 210 L 120 270 Z" fill="#ffffff" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 240px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<font color="#000000">
退出?
</font>
</div>
</div>
</div>
</foreignObject>
<text x="70" y="244" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
退出?
</text>
</switch>
</g>
<path d="M 230 370 L 250 310 L 350 310 L 330 370 Z" fill="#ffffff" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 340px; margin-left: 231px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<font color="#000000">
确认
</font>
</div>
</div>
</div>
</foreignObject>
<text x="290" y="344" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
确认
</text>
</switch>
</g>
<path d="M 130 239.5 L 290 239.97 Q 300 240 299.75 250 L 298.56 298.65" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 298.43 303.9 L 295.1 296.82 L 298.56 298.65 L 302.1 296.99 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<ellipse cx="80" cy="480" rx="60" ry="30" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<path d="M 290 370 L 290 470 Q 290 480 280 480 L 146.37 480" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 141.12 480 L 148.12 476.5 L 146.37 480 L 148.12 483.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
</g>
<switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
Text is not SVG - cannot display
</text>
</a>
</switch>
</svg>

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

@ -1,407 +0,0 @@
<mxfile host="65bd71144e">
<diagram id="e104r4jvqqDXH06fVmpZ" name="Page-1">
<mxGraphModel dx="805" dy="664" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="3300" pageHeight="4681" background="none" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="2" value="main" style="ellipse;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="20" y="20" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="3" value="init" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="15" y="120" width="130" height="50" as="geometry"/>
</mxCell>
<mxCell id="4" value="dispaly_menu" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="15" y="200" width="130" height="50" as="geometry"/>
</mxCell>
<mxCell id="5" value="" style="shape=link;html=1;width=91;" edge="1" parent="1">
<mxGeometry width="100" relative="1" as="geometry">
<mxPoint x="79.5" y="120" as="sourcePoint"/>
<mxPoint x="79.5" y="170" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="6" value="" style="shape=link;html=1;width=92;" edge="1" parent="1">
<mxGeometry width="100" relative="1" as="geometry">
<mxPoint x="79.5" y="200" as="sourcePoint"/>
<mxPoint x="79.5" y="250" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="7" value="c==CMD_READ" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="290" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="11" value="c==CMD_SAVE" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="390" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="12" value="c==CMD_PRINT" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="490" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="13" value="c==CMD_QUERY" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="580" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="14" value="c==CMD_INSERT" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="670" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="120" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="15" target="16">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="15" value="c==CMD_UPDATE" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="770" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="16" value="c==CMD_DELETE" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="860" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="17" value="c==CMD_SORT" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="960" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="18" value="c==CMD_CHART" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="1060" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="19" value="c==CMD_QUIT" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="1160" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="20" value="确定退出" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="1260" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="21" value="quit" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="10" y="1370" width="140" height="50" as="geometry"/>
</mxCell>
<mxCell id="22" value="" style="shape=link;html=1;width=100;" edge="1" parent="1">
<mxGeometry width="100" relative="1" as="geometry">
<mxPoint x="79.5" y="1370" as="sourcePoint"/>
<mxPoint x="80" y="1420" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="24" value="" style="whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={&quot;edgeStyle&quot;:&quot;entityRelationEdgeStyle&quot;,&quot;startArrow&quot;:&quot;none&quot;,&quot;endArrow&quot;:&quot;none&quot;,&quot;segment&quot;:10,&quot;curved&quot;:1,&quot;sourcePerimeterSpacing&quot;:0,&quot;targetPerimeterSpacing&quot;:0};" vertex="1" collapsed="1" parent="1">
<mxGeometry x="32.5" y="1460" width="95" height="45" as="geometry"/>
</mxCell>
<mxCell id="25" value="" style="edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;" edge="1" visible="0" target="24" parent="1" source="24">
<mxGeometry relative="1" as="geometry">
<mxPoint y="1492" as="sourcePoint"/>
</mxGeometry>
</mxCell>
<mxCell id="36" value="命令错误,请重新选择" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
<mxGeometry x="277.5" y="1170" width="155" height="50" as="geometry"/>
</mxCell>
<mxCell id="40" value="" style="shape=link;html=1;width=192;" edge="1" parent="1">
<mxGeometry width="100" relative="1" as="geometry">
<mxPoint x="340" y="447.5" as="sourcePoint"/>
<mxPoint x="340" y="447.5" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="45" value="read_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
<mxGeometry x="280" y="300" width="150" height="50" as="geometry"/>
</mxCell>
<mxCell id="46" value="save_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
<mxGeometry x="280" y="400" width="150" height="50" as="geometry"/>
</mxCell>
<mxCell id="47" value="print_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
<mxGeometry x="280" y="500" width="150" height="50" as="geometry"/>
</mxCell>
<mxCell id="48" value="query_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
<mxGeometry x="280" y="590" width="150" height="50" as="geometry"/>
</mxCell>
<mxCell id="50" value="add_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
<mxGeometry x="280" y="680" width="150" height="50" as="geometry"/>
</mxCell>
<mxCell id="51" value="update_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
<mxGeometry x="280" y="780" width="150" height="50" as="geometry"/>
</mxCell>
<mxCell id="52" value="delete_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
<mxGeometry x="280" y="870" width="150" height="50" as="geometry"/>
</mxCell>
<mxCell id="53" value="sort_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
<mxGeometry x="280" y="970" width="150" height="50" as="geometry"/>
</mxCell>
<mxCell id="54" value="make_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
<mxGeometry x="280" y="1070" width="150" height="50" as="geometry"/>
</mxCell>
<mxCell id="56" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="17" target="18">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="1170" as="sourcePoint"/>
<mxPoint x="260" y="1120" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="57" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="2">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="70" y="80" as="sourcePoint"/>
<mxPoint x="80" y="120" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="60" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="4">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="370" as="sourcePoint"/>
<mxPoint x="260" y="320" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="62" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="4" target="7">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="470" as="sourcePoint"/>
<mxPoint x="260" y="420" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="63" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="7" target="11">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="570" as="sourcePoint"/>
<mxPoint x="260" y="520" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="64" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="11" target="12">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="570" as="sourcePoint"/>
<mxPoint x="90" y="480" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="65" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="12" target="13">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="770" as="sourcePoint"/>
<mxPoint x="260" y="720" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="66" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="13" target="14">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="770" as="sourcePoint"/>
<mxPoint x="260" y="720" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="69" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="16" target="17">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="1070" as="sourcePoint"/>
<mxPoint x="260" y="1020" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="70" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="18" target="19">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="1070" as="sourcePoint"/>
<mxPoint x="260" y="1020" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="71" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="19" target="20">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="1270" as="sourcePoint"/>
<mxPoint x="260" y="1220" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="72" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="20">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="1270" as="sourcePoint"/>
<mxPoint x="80" y="1370" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="73" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="21" target="24">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="1270" as="sourcePoint"/>
<mxPoint x="260" y="1220" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="74" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="105" target="36">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="1270" as="sourcePoint"/>
<mxPoint x="260" y="1220" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="75" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="103" target="54">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="1070" as="sourcePoint"/>
<mxPoint x="260" y="1020" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="76" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="101" target="53">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="1070" as="sourcePoint"/>
<mxPoint x="260" y="1020" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="77" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="99" target="52">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="1070" as="sourcePoint"/>
<mxPoint x="260" y="1020" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="78" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="97" target="51">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="770" as="sourcePoint"/>
<mxPoint x="260" y="720" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="79" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="95" target="50">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="770" as="sourcePoint"/>
<mxPoint x="260" y="720" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="80" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="93" target="48">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="670" as="sourcePoint"/>
<mxPoint x="260" y="620" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="82" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="91" target="47">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="570" as="sourcePoint"/>
<mxPoint x="270" y="525" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="83" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="89" target="46">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="470" as="sourcePoint"/>
<mxPoint x="260" y="420" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="84" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="87" target="45">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="470" as="sourcePoint"/>
<mxPoint x="260" y="420" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="86" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="20">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="1470" as="sourcePoint"/>
<mxPoint x="80" y="180" as="targetPoint"/>
<Array as="points">
<mxPoint x="530" y="1295"/>
<mxPoint x="530" y="240"/>
<mxPoint x="530" y="180"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="88" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="7" target="87">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="325" as="sourcePoint"/>
<mxPoint x="280" y="325" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="87" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="310" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="90" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="11" target="89">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="425" as="sourcePoint"/>
<mxPoint x="280" y="425" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="89" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="410" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="92" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="12" target="91">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="525" as="sourcePoint"/>
<mxPoint x="280" y="525" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="91" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="510" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="94" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="13" target="93">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="615" as="sourcePoint"/>
<mxPoint x="280" y="615" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="93" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="600" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="96" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="14" target="95">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="705" as="sourcePoint"/>
<mxPoint x="280" y="705" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="95" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="690" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="98" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="15" target="97">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="805" as="sourcePoint"/>
<mxPoint x="280" y="805" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="97" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="790" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="100" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="16" target="99">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="895" as="sourcePoint"/>
<mxPoint x="280" y="895" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="99" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="880" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="102" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="17" target="101">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="995" as="sourcePoint"/>
<mxPoint x="280" y="995" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="101" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="980" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="104" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="18" target="103">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="1095" as="sourcePoint"/>
<mxPoint x="280" y="1095" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="103" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="1080" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="106" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="19" target="105">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="1195" as="sourcePoint"/>
<mxPoint x="287.5" y="1195" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="105" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="1180" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="107" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="1270" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="108" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="55" y="250" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="109" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="50" y="360" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="110" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="50" y="460" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="111" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="45" y="555" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="112" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="50" y="640" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="116" value="" style="endArrow=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="15">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="80" y="840" as="sourcePoint"/>
<mxPoint x="80" y="840" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="117" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="14" target="15">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="210" y="870" as="sourcePoint"/>
<mxPoint x="260" y="820" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="119" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="45" y="740" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="121" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="45" y="840" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="122" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="45" y="930" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="123" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="45" y="1030" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="124" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="45" y="1130" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="125" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="45" y="1230" width="30" height="30" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

@ -1,130 +0,0 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="386px" height="671px" viewBox="-0.5 -0.5 386 671" content="&lt;mxfile&gt;&lt;diagram id=&quot;e3oTxjj-4aZzAkHSJ-pD&quot; name=&quot;Page-1&quot;&gt;7ZnPb5swFMf/Gl8rwNjAMSRku0yq1MPW0+QFNyBBQI7TJPvrZwcTMHa6pEtZl1XKwe/5B/b3ffJ4AIDTcveJkTr7UqW0AJ6T7gCcAc9Dngfkz0n3jQPjsHEsWZ42LrdzPOQ/qXI6yrvJU7rWBvKqKnhe685FtVrRBdd8hLFqqw97qgr9qjVZUsPxsCCF6f2apzxrvBA6TtfxmebLTF3ax6GaUpJ2tBq6zkhabXsumAA4ZVXFm1a5m9JCitcK08ybn+g97ozRFT9ngorEMyk26nCMkvR7SjhRG+T79thiplBYGPE2yzl9qMlC9mxFjIUv42UhLFc01ZqUcbo7uS/3eFqBCa1KytleDFEToNJHEeIrc9vJ7bYSZj2lsfIRFeHlceFOA9FQMtglgYYkIAlBnIAIggSBEIEJAgkGEQZhABIfxDGIseyKHBDODNlEiGvZFIcnRUGLaslIKVSqKcvF5igb9t13Hb9T+inf0fYP8jbKu/hM6dEVpPct0guVIyV9PAWhY5H+thT3xlQcWRUfoi0a4h8wAUkAJtGhMZfBiOaG9Cyryh+b9Tg5Amm6QWTRzbXoFlxBN2xNEpO5VEwmibnU8OZI9UJdcj+wSA5tqKI/lzywJ4e5TLsSTP8AphEEsbx0JiB2DjlkBiL0z8ch0lMGikZMGaEZh79aKehIYlsWeKtSITpDilU6kSWnsBYFWa/zha4A3eX8m2g7d0hZj72emTyk0xr71liJffYmSfOx39dNO1jtvGZzNDWq24HW4gDVhi2oViJywpaU90okMyI9ydEL8DFaEJ4/65uwhUFd4b7KxfY6+H0dfjjM583m1ax+7TtcaPAvgt5goebIxkIHKo7HPguU9jZ026RAkxT/g5QLSXH/B1J8kxT0QcqFpJjP7q8mxe1x0lHzHkhBJin4Jkg5Pq60tfSwIDlBiogn2feG1XLA+vSGh9eBqobvwGtWfDWGlvclt5ewsIlh8J4w9K+VsPw3TFiW1zsjk+Kj8BJWDlbvUe+6eSz8AOhCgCxvq0YGKAr1ZHOHAzgeRMGtQjS8SQXuODdDHGmfRy69GQqz+1TTDO8+eMHkFw==&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs/>
<g>
<ellipse cx="60" cy="30" rx="60" ry="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 30px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
read_data
</div>
</div>
</div>
</foreignObject>
<text x="60" y="34" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
read_data
</text>
</switch>
</g>
<path d="M 0 170 L 20 120 L 120 120 L 100 170 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 145px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
输入文件名
</div>
</div>
</div>
</foreignObject>
<text x="60" y="149" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
输入文件名
</text>
</switch>
</g>
<path d="M 0 270 L 20 220 L 120 220 L 100 270 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 245px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
打开文件
</div>
</div>
</div>
</foreignObject>
<text x="60" y="249" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
打开文件
</text>
</switch>
</g>
<path d="M 60 310 L 115 345 L 60 380 L 5 345 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 345px; margin-left: 6px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
文件为空?
</div>
</div>
</div>
</foreignObject>
<text x="60" y="349" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
文件为空?
</text>
</switch>
</g>
<path d="M 255 485 L 275 430 L 385 430 L 365 485 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 458px; margin-left: 256px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
读取文件
</div>
</div>
</div>
</foreignObject>
<text x="320" y="461" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
读取文件
</text>
</switch>
</g>
<path d="M 260 600 L 280 550 L 380 550 L 360 600 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 575px; margin-left: 261px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
提示读取/记录
</div>
</div>
</div>
</foreignObject>
<text x="320" y="579" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
提示读取/记录
</text>
</switch>
</g>
<ellipse cx="65" cy="640" rx="60" ry="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<path d="M 60 60 L 60 113.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 60 118.88 L 56.5 111.88 L 60 113.63 L 63.5 111.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 60 170 L 60 213.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 60 218.88 L 56.5 211.88 L 60 213.63 L 63.5 211.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 60 270 L 60 303.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 60 308.88 L 56.5 301.88 L 60 303.63 L 63.5 301.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 115 345 L 310 345 Q 320 345 320 355 L 320 423.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 320 428.88 L 316.5 421.88 L 320 423.63 L 323.5 421.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 320 485 L 320 543.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 320 548.88 L 316.5 541.88 L 320 543.63 L 323.5 541.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 60 380 L 59.96 603.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 59.96 608.88 L 56.46 601.88 L 59.96 603.63 L 63.46 601.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 320 600 L 320 640 Q 320 650 310 650.02 L 129.57 650.37" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 124.32 650.38 L 131.31 646.86 L 129.57 650.37 L 131.32 653.86 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
</g>
<switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
Text is not SVG - cannot display
</text>
</a>
</switch>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

@ -1,67 +0,0 @@
<mxfile host="65bd71144e">
<diagram id="KfGg7ewQHjnR5lwAaYOd" name="Page-1">
<mxGraphModel dx="832" dy="563" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="5" value="" style="edgeStyle=none;html=1;strokeColor=#130b0b;" parent="1" source="3" target="4" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="3" value="&lt;font color=&quot;#0d0808&quot;&gt;save_data&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
<mxGeometry x="90" y="70" width="170" height="80" as="geometry"/>
</mxCell>
<mxCell id="7" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="4" target="6" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="4" value="&lt;font color=&quot;#000000&quot;&gt;输入文件名&lt;/font&gt;" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
<mxGeometry x="90" y="180" width="170" height="50" as="geometry"/>
</mxCell>
<mxCell id="9" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="6" target="8" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="6" value="&lt;font color=&quot;#000000&quot;&gt;打开文件&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;gradientColor=#FFFFFF;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
<mxGeometry x="100" y="260" width="150" height="50" as="geometry"/>
</mxCell>
<mxCell id="11" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="8" target="10" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="17" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="8" target="16" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="430" y="380"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="8" value="&lt;font color=&quot;#000000&quot;&gt;打开文件成功?&lt;/font&gt;" style="rhombus;whiteSpace=wrap;html=1;rounded=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
<mxGeometry x="90" y="340" width="170" height="80" as="geometry"/>
</mxCell>
<mxCell id="13" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="10" target="12" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="10" value="&lt;font color=&quot;#000000&quot;&gt;把所有库存记录写入文档&lt;/font&gt;" style="shape=document;whiteSpace=wrap;html=1;boundedLbl=1;rounded=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
<mxGeometry x="100" y="450" width="150" height="80" as="geometry"/>
</mxCell>
<mxCell id="15" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="12" target="14" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="12" value="&lt;font color=&quot;#000000&quot;&gt;关闭文件&lt;/font&gt;" style="whiteSpace=wrap;html=1;rounded=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
<mxGeometry x="100" y="560" width="150" height="70" as="geometry"/>
</mxCell>
<mxCell id="14" value="" style="ellipse;whiteSpace=wrap;html=1;rounded=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
<mxGeometry x="90" y="670" width="170" height="60" as="geometry"/>
</mxCell>
<mxCell id="18" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="16" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="170" y="650" as="targetPoint"/>
<Array as="points">
<mxPoint x="430" y="650"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="16" value="&lt;font color=&quot;#000000&quot;&gt;提示打开文件失败&lt;/font&gt;" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;rounded=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
<mxGeometry x="350" y="510" width="160" height="60" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

@ -1,55 +0,0 @@
<mxfile host="65bd71144e">
<diagram id="XFK3w_GTDJXIYlRDLBu6" name="Page-1">
<mxGraphModel dx="598" dy="531" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="8" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="2" target="7">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="2" value="" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
<mxGeometry x="100" y="50" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="10" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="7" target="9">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="7" value="" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
<mxGeometry x="80" y="160" width="160" height="60" as="geometry"/>
</mxCell>
<mxCell id="12" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="9" target="11">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="16" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="9" target="15">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="380" y="290"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="9" value="" style="rhombus;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
<mxGeometry x="60" y="250" width="200" height="80" as="geometry"/>
</mxCell>
<mxCell id="18" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="11" target="17">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="11" value="" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
<mxGeometry x="80" y="360" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="20" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="15">
<mxGeometry relative="1" as="geometry">
<mxPoint x="160" y="470" as="targetPoint"/>
<Array as="points">
<mxPoint x="380" y="470"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="15" value="" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
<mxGeometry x="300" y="360" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="17" value="" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
<mxGeometry x="80" y="500" width="160" height="80" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

669
text.c

@ -1,354 +1,383 @@
#define NAME_LEN 31 #include <stdio.h>
#define MAX_PARTS 100 #include <stdlib.h>
//保存学生成绩信息的结构 #include <string.h>
struct students #define MAX_LEN 10 // 字符串最大长度
#define STU_NUM 30 // 最多的学生人数
#define COURSE_NUM 6 // 最多的考试科目数
typedef struct student
{ {
int number; long num; // 每个学生的学号
char name[NAME_LEN + 1]; char name[MAX_LEN]; // 每个学生的姓名
int score; float score[COURSE_NUM]; // 每个学生COURSE_NUM门功课的成绩
}; float sum; // 每个学生的总成绩
static struct students stu[MAX_PARTS]; float aver; // 每个学生的平均成绩
static int num_parts = 0; }STU;
#include <stdio.h> int Menu(void);
#include <stdlib.h> void ReadScore(STU stu[], int n, int m);
void AverSumofEveryStudent(STU stu[], int n, int m);
//定义常量 void AverSumofEveryCourse(STU stu[], int n, int m);
#define CMD_QUIT 0 void SortbyScore(STU stu[],int n,int m,int (*compare)(float a,float b));
#define CMD_QUERY 4 int Ascending(float a, float b);
#define CMD_INSERT 5 int Descending(float a, float b);
#define CMD_UPDATE 6 void SwapFloat(float *x, float *y);
#define CMD_DELETE 7 void SwapLong(long *x, long *y);
#define CMD_READ 1 void SwapChar(char x[], char y[]);
#define CMD_SAVE 2 void AsSortbyNum(STU stu[], int n, int m);
#define CMD_PRINT 3 void SortbyName(STU stu[], int n, int m);
#define CMD_SORT 8 void SearchbyNum(STU stu[], int n, int m);
#define CMD_CHART 9 void SearchbyName(STU stu[], int n, int m);
// 菜单命令的编号 void StatisticAnalysis(STU stu[], int n, int m);
void PrintScore(STU stu[], int n, int m);
// 函数声明 void WritetoFile(STU record[], int n, int m);
void init(void); void ReadfromFile(STU record[], int *n, int *m);
void quit(void);
void display_menu(void);
int make_choice(void);
void read_data(void); // 读取
void save_data(void); // 保存
void print_data(void); // 打印
void query_data(void); // 查询
void add_data(void); // 添加
void update_data(void); // 修改
void delete_data(void); // 删除
void sort_data(void); // 排序
void make_chart(void); // 图表
int confirm(const char *msg);
// 主程序
int main(void) int main(void)
{ {
init(); // 程序启动 char ch;
while (1) int n = 0, m = 0;
{ STU stu[STU_NUM];
display_menu(); printf("Input student number(n<%d):", STU_NUM);
int c = make_choice(); scanf("%d", &n);
switch (c) printf("Input course number(m<=%d):",COURSE_NUM);
{ scanf("%d", &m);
case CMD_QUERY: while (1)
query_data(); {
break; ch = Menu(); // 显示菜单,并读取用户输入
case CMD_INSERT: switch (ch)
add_data(); {
break; case 1:ReadScore(stu, n, m);
case CMD_UPDATE: break;
update_data(); case 2: AverSumofEveryCourse(stu, n, m);
break; break;
case CMD_DELETE: case 3: AverSumofEveryStudent(stu, n, m);
delete_data(); break;
break; case 4: SortbyScore(stu, n, m, Descending);
case CMD_READ: printf("\nSort in descending order by score:\n");
read_data(); PrintScore(stu, n, m);
break; break;
case CMD_SAVE: case 5: SortbyScore(stu, n, m, Ascending);
save_data(); printf("\nSort in ascending order by score:\n");
break; PrintScore(stu, n, m);
case CMD_PRINT: break;
print_data(); case 6: AsSortbyNum(stu, n, m);
break; printf("\nSort in ascending order by number:\n");
case CMD_SORT: PrintScore(stu, n, m);
sort_data(); break;
break; case 7: SortbyName(stu, n, m);
case CMD_CHART: printf("\nSort in dictionary order by name:\n");
make_chart(); PrintScore(stu, n, m);
break; break;
default: case 8: SearchbyNum(stu, n, m);
puts("命令错误,请重新选择"); break;
break; case 9: SearchbyName(stu, n, m);
case CMD_QUIT: break;
if (confirm("确定要退出吗?")) case 10: StatisticAnalysis(stu, n, m);
quit(); // 仅在确认后退出 break;
break; case 11:PrintScore(stu, n, m);
} break;
} case 12:WritetoFile(stu, n, m);
return 0; break;
case 13:ReadfromFile(stu, &n, &m);
break;
case 0: printf("End of program!");
exit(0);
default:printf("Input error!");
}
}
return 0;}
// 函数功能:显示菜单并获得用户键盘输入的选项
int Menu(void)
{
int itemSelected;
printf("Management for Students' scores\n");
printf("1.Input record\n");
printf("2.Calculate total and average score of every course\n");
printf("3.Calculate total and average score of every student\n");
printf("4.Sort in descending order by score\n");
printf("5.Sort in ascending order by score\n");
printf("6.Sort in ascending order by number\n");
printf("7.Sort in dictionary order by name\n");
printf("8.Search by number\n");
printf("9.Search by name\n");
printf("10.Statistic analysis\n");
printf("11.List record\n");
printf("12.Write to a file\n");
printf("13.Read from a file\n");
printf("0.Exit\n");
printf("Please Input your choice:");
scanf("%d", &itemSelected); // 读入用户输入
return itemSelected;
} }
// 函数功能输入n个学生的m门课成绩
void ReadScore(STU stu[], int n, int m)
{
int i, j;
printf("Input student's ID, name and score:\n");
/* ---------- begain ---------- */
for(i=0;i<n;i++)
{scanf("%ld%s",&stu[i].num,stu[i].name);
for (j=0; j<m; j++)
scanf("%f",&stu[i].score[j]);
}
// 函数定义 /* ----------- end ----------- */
void init(void) }
// 函数功能:计算每个学生各门课程的总分和平均分
void AverSumofEveryStudent(STU stu[], int n, int m)
{ {
puts("程序启动"); int i, j;
for (i=0; i<n; i++)
{
stu[i].sum = 0;
for (j=0; j<m; j++)
{
stu[i].sum = stu[i].sum + stu[i].score[j];
}
stu[i].aver = m>0 ? stu[i].sum / m : -1;
printf("student %d: sum = %.0f, aver = %.0f\n",
i+1, stu[i].sum, stu[i].aver);
}
} }
void quit(void) // 函数功能:计算每门课程的总分和平均分
void AverSumofEveryCourse(STU stu[], int n, int m)
{ {
puts("程序退出"); int i, j;
exit(EXIT_SUCCESS); float sum[COURSE_NUM], aver[COURSE_NUM];
/* ---------- begain ---------- */
for (j=0; j<m; j++)
{
sum[j] = 0;
for (i=0; i<n; i++)
{
sum[j] += stu[i].score[j];
}
aver[j]=sum[j]/i;
printf("student %d: sum = %.0f, aver = %.0f\n",
j+1, sum[j], aver[j]);
}
/* ----------- end ----------- */
} }
void display_menu(void) // 函数功能按选择法将数组sum的元素值排序
void SortbyScore(STU stu[],int n,int m,int (*compare)(float a,float b))
{ {
printf("\n%d 读取 | %d 保存 | %d 打印 | %d 查询 | %d 添加\n%d 修改 | %d 删除 | %d 排序 | %d 图表 | %d 退出\n\n", CMD_READ, CMD_SAVE, CMD_PRINT, CMD_QUERY, CMD_INSERT, CMD_UPDATE, CMD_DELETE, CMD_SORT, CMD_CHART, CMD_QUIT); int i, j, k, t;
for (i=0; i<n-1; i++)
{
k = i;
for (j=i+1; j<n; j++)
{
if ((*compare)(stu[j].sum, stu[k].sum)) k = j;
}
if (k != i)
{
for (t=0; t<m; t++) // 交换m门课程的成绩
{
SwapFloat(&stu[k].score[t], &stu[i].score[t]);
}
SwapFloat(&stu[k].sum, &stu[i].sum); // 交换总分
SwapFloat(&stu[k].aver, &stu[i].aver); // 交换平均分
SwapLong(&stu[k].num, &stu[i].num); // 交换学号
SwapChar(stu[k].name, stu[i].name); // 交换姓名
}
}
} }
int make_choice(void) // 使数据按升序排序
int Ascending(float a, float b)
{ {
int c; // 用户输入 return a < b; // 这样比较决定了按升序排序如果a<b则交换
int n = 0; // 正确读入的数据项个数
while (n == 0)
{
printf("请选择:");
n = scanf("%d", &c); // 尝试读入整数 c
scanf("%*[^\n]"); // 跳过一行中剩余的字符
}
return c;
} }
// 使数据按降序排序
//查询 int Descending(float a, float b)
void query_data(void)
{ {
int num; return a > b; // 这样比较决定了按降序排序如果a>b则交换
printf("输入学生学号: ");
scanf("%d", &num);
int f = -1;
for (int i = 0; i < num_parts; i++)
{
if (num == stu[i].number)
{
f = i;
break;
}
}
if (f == -1)
{
printf("学生不存在");
}
else
{
printf("学生学号:%d\n", stu[f].number);
printf("学生姓名:%s\n", stu[f].name);
printf("学生成绩:%d\n", stu[f].score);
}
} }
// 交换两个单精度浮点型数据
//打印 void SwapFloat(float *x, float *y)
void print_data(void)
{ {
printf("NUMBER | NAME score\n"); float temp;
for (int i = 0; i < num_parts; i++) temp = *x;
{ *x = *y;
printf("%d | %s %d\n", stu[i].number, stu[i].name, stu[i].score); *y = temp;
}
} }
// 交换两个长整型数据
//添加 void SwapLong(long *x, long *y)
void add_data(void)
{ {
int num; long temp;
printf("输入学生学号:"); temp = *x;
scanf("%d", &num); *x = *y;
int f = 0; *y = temp;
for (int i = 0; i < num_parts; i++)
{
if (num == stu[i].number)
{
f = 1;
break;
}
}
if (f == 0)
{
stu[num_parts].number = num;
printf("输入学生姓名:");
scanf("%s", &stu[num_parts].name);
printf("输入学生成绩:");
scanf("%d", &stu[num_parts].score);
num_parts++;
printf("学生 %d 添加成功\n", num);
}
else
{
printf("学生已存在");
}
} }
// 交换两个字符串
//修改 void SwapChar(char x[], char y[])
void update_data(void)
{ {
int num; char temp[MAX_LEN];
printf("输入学生学号:"); strcpy(temp, x);
scanf("%d", &num); strcpy(x, y);
int f = 0; strcpy(y, temp);
for (int i = 0; i < num_parts; i++)
{
if (num == stu[i].number)
{
f = 1;
break;
}
}
if (f == 0)
{
printf("学生不存在");
}
else
{
printf("输入学生学号:");
scanf("%d", &stu[num].number);
printf("输入学生姓名:");
scanf("%s", stu[num].name);
printf("输入学生成绩:");
scanf("%d", &stu[num].score);
printf("学生 %d 已更新", num);
}
} }
// 函数功能按选择法将数组num的元素值按从低到高排序
void AsSortbyNum(STU stu[], int n, int m)
{
int i, j, k, t;
for (i=0; i<n-1; i++)
{
/* ---------- begain ---------- */
//删除 k=i;
void delete_data(void) for (j=i+1;j<10;j++){
if((*compare)(stu[k]num.stu[j].num)) k=j;}
if(k!=i){t=stu[i].num;stu[i].num=stu[k].num;stu[k].num=t;}
/* ----------- end ----------- */
}
}
// 函数功能:交换法实现字符串按字典顺序排序
void SortbyName(STU stu[], int n, int m)
{ {
int num; int i, j, t;
printf("输入学生学号:"); for (i=0; i<n-1; i++)
scanf("%d", &num); {
int f = 0, i, j; for (j = i+1; j<n; j++)
for (i = 0; i < num_parts; i++) {
{ if (strcmp(stu[j].name, stu[i].name) < 0)
if (num == stu[i].number) {
{ for (t=0; t<m; t++)// 交换m门课程的成绩
f = 1; {
break; SwapFloat(&stu[i].score[t], &stu[j].score[t]);
} }
} SwapFloat(&stu[i].sum, &stu[j].sum); // 交换总分
if (f == 0) SwapFloat(&stu[i].aver, &stu[j].aver); // 交换平均分
{ SwapLong(&stu[i].num, &stu[j].num); // 交换学号
printf("学生不存在"); SwapChar(stu[i].name, stu[j].name); // 交换姓名
} }
else }
{ }
for (j = i; j < num_parts - 1; j++)
{
stu[j] = stu[j + 1];
}
num_parts--;
printf("删除成功");
}
} }
// 函数功能:按学号查找学生成绩并显示查找结果
void read_data(void) void SearchbyNum(STU stu[], int n, int m)
{ {
puts("读取数据"); long number;
printf("请输入文件名"); int i, j;
char filename[256]; printf("Input the number you want to search:");
scanf("%s", filename); scanf("%ld", &number);
For(i=0;i<n;i++){
FILE *fp = fopen(filename, "r"); Ifstrcmp(number,stu[i].num)==0)
if (fp == NULL) printf("%ld\t%s\t", stu[i].num, stu[i].name);
{ for (j=0; j<m; j++)
perror(filename); {
return; printf("%.0f\t", stu[i].score[j]);
} }
int i = 0; printf("%.0f\t%.0f\n", stu[i].sum, stu[i].aver);
while (fscanf(fp, "%d,%[^,],%d", &stu[i].number, stu[i].name, &stu[i].score) == 3) return;
{ }
i++; }
} printf("\nNot found!\n");
fclose(fp);
num_parts = i;
printf("读取 %d 记录\n", num_parts);
} }
// 函数功能:按姓名的字典顺序排出成绩表
void save_data(void) void SearchbyName(STU stu[], int n, int m)
{ {
puts("保存数据"); char x[MAX_LEN];
printf(" 请输入文件名"); int i, j;
char filename[256]; printf("Input the name you want to search:");
scanf("%s", filename); scanf("%s", x);
FILE *fp = fopen(filename, "r"); for (i=0; i<n; i++)
if (fp == NULL) {
{ if (strcmp(stu[i].name, x) == 0)
perror(filename); {
return; printf("%ld\t%s\t", stu[i].num, stu[i].name);
} for (j=0; j<m; j++)
for (int i = 0; i < num_parts; i++) {
{ printf("%.0f\t", stu[i].score[j]);
fprintf(fp, "%d,%s,%d\n", stu[i].number, stu[i].name, stu[i].score); }
} printf("%.0f\t%.0f\n", stu[i].sum, stu[i].aver);
fclose(fp); return;
printf("保存%d 成功", num_parts); }
}
printf("\nNot found!\n");
} }
// 函数功能:统计各分数段的学生人数及所占的百分比
//排序 void StatisticAnalysis(STU stu[], int n, int m)
void sort_data(void)
{ {
printf("排序\n"); int i, j, t[6];
for (int i = 0; i < num_parts; i++) for (j=0; j<m; j++)
{ {
int change = 0; printf("For course %d:\n", j+1);
static struct students t; memset(t, 0, sizeof(t)); // 将数组t的全部元素初始化为0
for (int j = 0; j < num_parts - i - 1; j++) for (i=0; i<n; i++)
{ {
if (stu[j].number > stu[j + 1].number) if (stu[i].score[j]>=0 && stu[i].score[j]<60)t[0]++;
{ else if (stu[i].score[j]<70) t[1]++;
t = stu[j + 1]; else if (stu[i].score[j]<80) t[2]++;
stu[j + 1] = stu[j]; else if (stu[i].score[j]<90) t[3]++;
stu[j] = t; else if (stu[i].score[j]<100) t[4]++;
change = 1; else if (stu[i].score[j] == 100) t[5]++;
} }
} for (i=0; i<=5; i++)
if (!change) {
break; if (i==0) printf("<60\t%d\t%.2f%%\n",t[i],(float)t[i]/n*100);
} else if (i==5) printf("%d\t%d\t%.2f%%\n",
for (int i = 0; i < num_parts; i++) (i+5)*10,t[i],(float)t[i]/n*100);
{ else printf("%d-%d\t%d\t%.2f%%\n",
int change = 0; (i+5)*10, (i+5)*10+9, t[i], (float)t[i]/n*100);
static struct students t; }
for (int j = 0; j < num_parts - i - 1; j++) }
{
if (stu[j].score > stu[j + 1].score)
{
t = stu[j + 1];
stu[j + 1] = stu[j];
stu[j] = t;
change = 1;
}
}
if (!change)
break;
}
printf("排序已完成");
} }
// 函数功能: 打印学生成绩
void make_chart(void) void PrintScore(STU stu[], int n, int m)
{ {
printf("NUMBER | NAME score\n"); int i, j;
for (int i = 0; i < num_parts; i++) for (i=0; i<n; i++)
{ {
printf("%d | %s ", stu[i].number, stu[i].name); printf("%ld\t%s\t", stu[i].num, stu[i].name);
for (int j = 0; j < stu[i].score; j++) for (j=0; j<m; j++)
{ {
printf("*"); printf("%.0f\t", stu[i].score[j]);
} }
printf("\n"); printf("%.0f\t%.0f\n", stu[i].sum, stu[i].aver);
} }
printf("图表\n");
} }
// 输出n个学生的学号、姓名及m门课程的成绩到文件student.txt中
int confirm(const char *msg) void WritetoFile(STU stu[], int n, int m)
{
FILE *fp;
int i, j;
if ((fp = fopen("student.txt","w")) == NULL)
{
printf("Failure to open score.txt!\n");
exit(0);
}
fprintf(fp, "%d\t%d\n", n, m); //将学生人数和课程门数写入文件
for (i=0; i<n; i++)
{
fprintf(fp, "%10ld%10s", stu[i].num, stu[i].name);
for (j=0; j<m; j++)
{
fprintf(fp, "%10.0f", stu[i].score[j]);
}
fprintf(fp, "%10.0f%10.0f\n", stu[i].sum, stu[i].aver);
}
fclose(fp);
}
//从文件中读取学生的学号、姓名及成绩等信息写入到结构体数组stu中
void ReadfromFile(STU stu[],int *n, int *m)
{ {
char c = 'n'; // 默认选择是 no FILE *fp;
printf("%s(Y/N): ", msg); // 提示输入 yes/no 进行确认 int i, j;
scanf(" %c%*[^\n]", &c); // 读取第一个字符,忽略剩余字符 if ((fp = fopen("student.txt","r")) == NULL)
return c == 'y' || c == 'Y'; // 返回确认结果 {
printf("Failure to open score.txt!\n");
exit(0);
}
fscanf(fp, "%d\t%d", n, m); // 从文件中读出学生人数和课程门数
for (i=0; i<*n; i++) //学生人数保存在n指向的存储单元
{
fscanf(fp, "%10ld", &stu[i].num);
fscanf(fp, "%10s", stu[i].name);
for (j=0; j<*m; j++)//课程门数保存在m指向的存储单元
{
fscanf(fp, "%10f", &stu[i].score[j]); //不能用%10.0f
}
fscanf(fp, "%10f%10f", &stu[i].sum, &stu[i].aver);//不能用%10.0f
}
fclose(fp);
} }

@ -1,36 +0,0 @@
<mxfile host="65bd71144e">
<diagram id="4rOLv9Xi8nasrVEhpD6I" name="第 1 页">
<mxGraphModel dx="633" dy="615" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<<<<<<< HEAD
<mxCell id="2" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
<mxGeometry x="250" y="180" width="80" height="80" as="geometry"/>
=======
<mxCell id="8" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="5">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="3" value="make_chart" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="260" y="120" width="140" height="80" as="geometry"/>
</mxCell>
<mxCell id="4" value="" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="260" y="490" width="140" height="80" as="geometry"/>
</mxCell>
<mxCell id="9" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="5" target="6">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="5" value="读取文件" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
<mxGeometry x="260" y="250" width="140" height="60" as="geometry"/>
</mxCell>
<mxCell id="10" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="6" target="4">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="6" value="显示文件" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
<mxGeometry x="260" y="370" width="140" height="60" as="geometry"/>
>>>>>>> 456f225eb01b97142f653b827d7c303650179ba6
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Loading…
Cancel
Save