ykhao 2 years ago
commit fb5458f1cd

@ -299,10 +299,9 @@ a: No such file or directory
数据处理模块包括读取数据read_data、保存数据save_data、打印数据print_data、查询数据query_data、添加数据add_data、更新数据update_data、删除数据delete_data、数据排序sort_data和生成图表make_chart等子模块。其中查询、添加、更新和删除数据还会用到根据编号查询数据的方法find 数据处理模块包括读取数据read_data、保存数据save_data、打印数据print_data、查询数据query_data、添加数据add_data、更新数据update_data、删除数据delete_data、数据排序sort_data和生成图表make_chart等子模块。其中查询、添加、更新和删除数据还会用到根据编号查询数据的方法find
上述各模块通过主程序main进行调用系统模块图如下。 上述各模块通过主程序main进行调用系统模块图如下。
![](pictures/xitongmoban.drawio.svg)
![](pictures/xitongmoban.drawio.svg)
## 详细设计
各模块的主要功能如下: 各模块的主要功能如下:
@ -383,14 +382,13 @@ Step 5: 添加学生到数据
Step 6: 提示添加成功 Step 6: 提示添加成功
![](pictures/add_data.drawio.svg) ![](pictures/add_data.drawio.svg)
#### make_chart #### print_data
Step 1: 读取文件
Step 2: 显示图表
![](pictures/make_chart.drawio.svg) Step 1: 输出学号、姓名、成绩
![](pictures/print.drawio.svg)
#### read_data
#### delete_data #### delete_data
Step 1: 输入学号 Step 1: 输入学号
@ -400,6 +398,21 @@ Step 4: 提示删除成功
![](pictures/delete.drawio.svg) ![](pictures/delete.drawio.svg)
#### sort_data
Step 1: 读取文件
Step 2: 进行排序
Step 3: 提示排序已完成
![](pictures/sort.drawio.svg)
#### make_chart
Step 1: 读取文件
Step 2: 显示图表
![](pictures/make_chart.drawio.svg)
#### confirm #### confirm
Step 1: 输出 确定要退出吗 Step 1: 输出 确定要退出吗

@ -0,0 +1,52 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="151px" height="301px" viewBox="-0.5 -0.5 151 301" content="&lt;mxfile&gt;&lt;diagram id=&quot;LNEEokx9NuSkeupJaUJv&quot; name=&quot;Page-1&quot;&gt;xVXLboMwEPwa3wGH1xES0l4qVcqhx8oKG7BkMHKcAP36mmBehbSpGqUXWM+OsWcYDMLrrHoSpEhfeAwMWUZcIbxBluV4K3VtgLoFbAe3QCJo3ELmAOzoB2jQ0OiJxnCcECXnTNJiCu55nsNeTjAiBC+ntANn01ULksAM2O0Jm6NvNJZpi3q2MeDPQJO0W9k0dCcjHVkDx5TEvBxBOEJ4LTiXbZVVa2CNd50v7bztlW6/MQG5vGWCfhFnwk5am96XrDuxECvtepjzXN3CVGZMjUxVtvSGc3UHGjryk9hrll5FEpGAZuFevUoN8AykqBVFACOSnqdPJ/r9JT1vkKgKrXJZsTVTXAiay/eYSDLXzpjKVCO5TKmEXUEuCkqV6iUbziAkVN8bMZfYTehCUvepacflEDETaywdxcs1/u6K8z85wPMc2A/KAZ4rjjwURsjHKLKR56IwaIpggwLngmxR6F4QV3N8A3kbFDnI85o6UlNCFPgz59RHXjSlMoMwBowngmTKswIEVfsG8bX3OjR+Ct6BVtCdkHcKoj/NYX9WjXNoL+TQuUMO7Rty+MBv0rcnVmC8YMVqwQrv91ao4XDsX3qjfyeOPgE=&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs/>
<g>
<path d="M 75 70 L 75 103.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 75 108.88 L 71.5 101.88 L 75 103.63 L 78.5 101.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<ellipse cx="75" cy="35" rx="65" ry="35" 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: 128px; height: 1px; padding-top: 35px; margin-left: 11px;">
<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;">
print_data
</div>
</div>
</div>
</foreignObject>
<text x="75" y="39" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
print_data
</text>
</switch>
</g>
<path d="M 75 170 L 75 213.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 75 218.88 L 71.5 211.88 L 75 213.63 L 78.5 211.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 0 170 L 20 110 L 150 110 L 130 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: 148px; 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;">
输出学号姓名成绩
</div>
</div>
</div>
</foreignObject>
<text x="75" y="144" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
输出学号姓名成绩
</text>
</switch>
</g>
<ellipse cx="75" cy="260" rx="70" ry="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" 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>

After

Width:  |  Height:  |  Size: 4.6 KiB

@ -0,0 +1,90 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="121px" height="581px" viewBox="-0.5 -0.5 121 581" content="&lt;mxfile&gt;&lt;diagram id=&quot;N-I4I6gAUj6rZipbi3T4&quot; name=&quot;第 1 页&quot;&gt;3ZdNj5swEIZ/ja+V+SbHkCXtpVKlHNo9VVaYBUsGI8dZSH99bbAD1NntSu2iNhfieWcG2y8PBFCwq/uPgrTVZ14AQz4uehQ8IN+Pg0AdtXAxgheNQiloMUreJBzoDzAiNuqZFnBaFErOmaTtUjzypoGjXGhECN4ty544W87akhIc4XAkzFW/0kJWo5pGeNI/AS0rO7OHTaYmttgIp4oUvJtJQY6CneBcjqO63wHT3llfxr79C9nrwgQ08i0NqVmGvNi9QaG2asKGN+onq2TNVOSpIfRUflNj/CEy0eMs86AvMLbBxQaNFJdZkw4f57mpbYhs37g0vZ4XN2ekEz+Lo6kyaEkiSjBV4dVYBSTwGtQsqkQAI5I+L89ODBrltW5yTw2MgbfNNFM/E3Y2Jz1xIb8XRBLXZsYUrdrdrqISDi0ZNtCp+2XpuDknCAn96z64O7QNgaHN3m4m7CZ2PQtkNeM2xX/uyebuAAtdwKKVAAsdwFCeou0eZRnKI5Tu0SZGeayPaYLyUOtZ7FwB9dBp9VBtlDAGjJeC1MqPFgRVawLxa+7LlPgdrk+0B/vEfid8ffxGfuO/wK/9y7kjgCMX4HglgKMbACtWc7TxNcDZVjN8Z7gG/pq4eo59/zuusYtrshKu8W1c1WMWozxB21AT6wKsBwnKBmWbo3Q31KS6687YDsMV2U7cq/EvvVVF7/hapcLpm2DIzT6sgvwn&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs/>
<g>
<path d="M 60 80 L 60 133.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 60 138.88 L 56.5 131.88 L 60 133.63 L 63.5 131.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<ellipse cx="60" cy="40" rx="60" ry="40" 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: 40px; 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;">
sort_data
</div>
</div>
</div>
</foreignObject>
<text x="60" y="44" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
sort_data
</text>
</switch>
</g>
<path d="M 60 200 L 60 253.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 60 258.88 L 56.5 251.88 L 60 253.63 L 63.5 251.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 0 200 L 20 140 L 120 140 L 100 200 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: 170px; 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="174" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
读取文件
</text>
</switch>
</g>
<path d="M 60 320 L 60 373.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 60 378.88 L 56.5 371.88 L 60 373.63 L 63.5 371.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 0 320 L 20 260 L 120 260 L 100 320 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: 290px; 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="294" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
排序
</text>
</switch>
</g>
<path d="M 60 440 L 60 493.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 60 498.88 L 56.5 491.88 L 60 493.63 L 63.5 491.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 0 440 L 20 380 L 120 380 L 100 440 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: 410px; 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="414" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
提示排序已完成
</text>
</switch>
</g>
<ellipse cx="60" cy="540" rx="60" ry="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" 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>

After

Width:  |  Height:  |  Size: 7.9 KiB

Loading…
Cancel
Save