Compare commits
93 Commits
@ -0,0 +1,52 @@
|
|||||||
|
<mxfile host="65bd71144e">
|
||||||
|
<diagram id="WNjXzI9tJw80ir65-z7G" name="第 1 页">
|
||||||
|
<mxGraphModel dx="1072" dy="1668" 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"/>
|
||||||
|
<mxCell id="28" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="2" target="27">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2" value="add_data" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.start_1;whiteSpace=wrap;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="150" y="-200" width="100" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="7" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" source="5" target="6" edge="1">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="26" value="" style="edgeStyle=none;html=1;" parent="1" source="5" target="25" edge="1">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="5" value="学号是否存在" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.decision;whiteSpace=wrap;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="127.5" y="-10" width="145" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="6" value="<span style="color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 16px; text-align: justify; background-color: rgb(255, 255, 255);">输入学生名称、名次,添加分数</span>" style="rounded=1;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=2;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="400" y="-5" width="100" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="13" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="170" y="80" width="30" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="14" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="320" y="-5" width="30" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="25" value="end" style="whiteSpace=wrap;html=1;strokeWidth=2;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="140" y="190" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="29" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="27" target="5">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="27" value="输入学号" style="whiteSpace=wrap;html=1;strokeWidth=2;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="140" y="-110" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="30" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="6">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="380" y="200" as="sourcePoint"/>
|
||||||
|
<mxPoint x="200" y="160" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="450" y="160"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,58 @@
|
|||||||
|
<mxfile host="65bd71144e">
|
||||||
|
<diagram id="zc0ZgzD_S0VL_faU3Ea_" name="第 1 页">
|
||||||
|
<mxGraphModel dx="1072" dy="568" 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"/>
|
||||||
|
<mxCell id="6" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="2" target="5">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2" value="delete_data" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.start_1;whiteSpace=wrap;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="190" y="40" width="100" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="8" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="5" target="7">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="5" value="输入学生学号" style="whiteSpace=wrap;html=1;strokeWidth=2;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="180" y="180" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="10" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="7" target="9">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="12" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="7" target="11">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="7" value="是否查找成功" style="rhombus;whiteSpace=wrap;html=1;strokeWidth=2;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="165" y="310" width="150" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="18" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="9" target="17">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="9" value="删除信息" style="whiteSpace=wrap;html=1;strokeWidth=2;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="180" y="465" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="11" value="学生不存在" style="whiteSpace=wrap;html=1;strokeWidth=2;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="410" y="315" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="13" 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="195" y="395" width="30" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="14" 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="345" y="305" width="30" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="17" value="结束" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=2;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="190" y="600" width="100" height="55" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="20" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="11">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="400" y="520" as="sourcePoint"/>
|
||||||
|
<mxPoint x="240" y="560" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="470" y="560"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 28 KiB |
@ -0,0 +1,25 @@
|
|||||||
|
<mxfile host="65bd71144e">
|
||||||
|
<diagram id="0uuTY4-XFXE3oc_kBmGN" name="第 1 页">
|
||||||
|
<mxGraphModel dx="1072" dy="568" 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"/>
|
||||||
|
<mxCell id="4" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="2" target="3">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2" value="make_chart" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="260" y="50" width="110" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="6" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3" target="5">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="3" value="<span style="color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 16px; text-align: justify; background-color: rgb(255, 255, 255);">以图表方式显示库存记录</span>" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="255" y="205" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="5" value="结束" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="267.5" y="340" width="95" height="55" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
After Width: | Height: | Size: 5.6 KiB |
@ -0,0 +1,25 @@
|
|||||||
|
<mxfile host="65bd71144e">
|
||||||
|
<diagram id="sSdlW-A8PZKlWb_nUc6-" name="第 1 页">
|
||||||
|
<mxGraphModel dx="560" dy="527" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="0"/>
|
||||||
|
<mxCell id="1" parent="0"/>
|
||||||
|
<mxCell id="4" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="2" target="3">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2" value="print_data" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="120" y="80" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="6" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3" target="5">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="3" value="遍历打印学生成绩" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="120" y="170" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="5" value="结束" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="120" y="260" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
After Width: | Height: | Size: 4.6 KiB |
@ -0,0 +1,61 @@
|
|||||||
|
<mxfile host="65bd71144e">
|
||||||
|
<diagram id="jYJfybgj_iSbBnIaVfk1" name="第 1 页">
|
||||||
|
<mxGraphModel dx="560" dy="527" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="0"/>
|
||||||
|
<mxCell id="1" parent="0"/>
|
||||||
|
<mxCell id="4" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="2" target="3">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2" value="query_data" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="110" y="50" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="6" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="170" y="230" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="3" value="输入学生学号" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="110" y="140" width="120" height="50" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="9" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="7" target="8">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="13" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="7" target="12">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="7" value="是否查找成功" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="110" y="230" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="11" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="8" target="10">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="8" value="输出记录编号" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="110" y="320" width="120" height="50" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="10" value="结束" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="110" y="400" width="120" height="50" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="14" style="edgeStyle=none;html=1;" edge="1" parent="1" source="12">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="170" y="390" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="440" y="260"/>
|
||||||
|
<mxPoint x="440" y="320"/>
|
||||||
|
<mxPoint x="440" y="390"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="12" value="输出学生不存在" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="280" y="235" width="120" height="50" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="15" value="N" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="220" y="235" width="60" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="16" value="Y" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="120" y="285" width="60" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,91 @@
|
|||||||
|
<mxfile host="65bd71144e">
|
||||||
|
<diagram id="i68sKa4qSy_DR3-xR5vY" name="第 1 页">
|
||||||
|
<mxGraphModel dx="560" dy="527" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="0"/>
|
||||||
|
<mxCell id="1" parent="0"/>
|
||||||
|
<mxCell id="4" 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="2" target="3">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2" value="sava_data" style="ellipse;whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="90" y="90" width="120" height="80" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="6" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="150" y="330" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="20" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="3">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="150" y="320" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="3" value="输入文件名" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="75" y="210" width="150" height="80" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="7" style="edgeStyle=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="5">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="150" y="330" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="9" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="5" target="8">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="11" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="5" target="10">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="5" value="打开文件" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="75" y="320" width="150" height="80" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="24" style="edgeStyle=none;html=1;" edge="1" parent="1" source="8">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="150" y="640" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="470" y="360"/>
|
||||||
|
<mxPoint x="470" y="640"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="8" value="提示打开文件失败" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="280" y="330" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="13" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;startArrow=none;" edge="1" parent="1" source="14">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="150" y="590" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="16" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="10">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="150" y="550" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="10" value="将所有成绩记录写入文件" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="70" y="440" width="160" height="80" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="15" value="" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;endArrow=none;" edge="1" parent="1" source="10" target="14">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="150" y="520" as="sourcePoint"/>
|
||||||
|
<mxPoint x="150" y="590" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="17" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="14" target="18">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="150" y="660" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="14" value="关闭文件" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="65" y="550" width="170" height="80" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="18" value="结束" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="90" y="660" width="120" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="22" value="Y" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="140" y="400" width="60" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="23" value="N" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="220" y="330" width="60" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
After Width: | Height: | Size: 13 KiB |
@ -0,0 +1,25 @@
|
|||||||
|
<mxfile host="65bd71144e">
|
||||||
|
<diagram id="ID9VlrPP0GZXrZxrXAXf" name="第 1 页">
|
||||||
|
<mxGraphModel dx="1072" dy="568" 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"/>
|
||||||
|
<mxCell id="4" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="2" target="3">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2" value="sort_data" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="240" y="60" width="110" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="6" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3" target="5">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="3" value="<span style="color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 16px; text-align: justify; background-color: rgb(255, 255, 255);">对学生成绩按学生学号从小到大排序</span>" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="235" y="215" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="5" value="结束" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="255" y="345" width="80" height="45" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
After Width: | Height: | Size: 5.6 KiB |
@ -0,0 +1,52 @@
|
|||||||
|
<mxfile host="65bd71144e">
|
||||||
|
<diagram id="XrmENeajpscoQa9QB7--" name="第 1 页">
|
||||||
|
<mxGraphModel dx="1072" dy="568" 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"/>
|
||||||
|
<mxCell id="4" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="2" target="3">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2" value="update_data" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="190" y="40" width="110" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="6" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3" target="5">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="8" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="3" target="7">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="3" value="输入学号" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="185" y="195" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="10" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="5" target="9">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="5" value="输入姓名,成绩" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="185" y="370" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="7" value="学生不存在" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="425" y="195" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="9" value="结束" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="192.5" y="550" width="105" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="11" 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="215" y="285" width="30" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="12" 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="345" y="185" width="30" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="13" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="7">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="400" y="450" as="sourcePoint"/>
|
||||||
|
<mxPoint x="250" y="490" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="490" y="490"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
After Width: | Height: | Size: 9.6 KiB |
@ -0,0 +1,354 @@
|
|||||||
|
#define NAME_LEN 31
|
||||||
|
#define MAX_PARTS 100
|
||||||
|
//保存学生成绩信息的结构
|
||||||
|
struct students
|
||||||
|
{
|
||||||
|
int number;
|
||||||
|
char name[NAME_LEN + 1];
|
||||||
|
int score;
|
||||||
|
};
|
||||||
|
static struct students stu[MAX_PARTS];
|
||||||
|
static int num_parts = 0;
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
//定义常量
|
||||||
|
#define CMD_QUIT 0
|
||||||
|
#define CMD_QUERY 4
|
||||||
|
#define CMD_INSERT 5
|
||||||
|
#define CMD_UPDATE 6
|
||||||
|
#define CMD_DELETE 7
|
||||||
|
#define CMD_READ 1
|
||||||
|
#define CMD_SAVE 2
|
||||||
|
#define CMD_PRINT 3
|
||||||
|
#define CMD_SORT 8
|
||||||
|
#define CMD_CHART 9
|
||||||
|
// 菜单命令的编号
|
||||||
|
|
||||||
|
// 函数声明
|
||||||
|
void init(void);
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
init(); // 程序启动
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
display_menu();
|
||||||
|
int c = make_choice();
|
||||||
|
switch (c)
|
||||||
|
{
|
||||||
|
case CMD_QUERY:
|
||||||
|
query_data();
|
||||||
|
break;
|
||||||
|
case CMD_INSERT:
|
||||||
|
add_data();
|
||||||
|
break;
|
||||||
|
case CMD_UPDATE:
|
||||||
|
update_data();
|
||||||
|
break;
|
||||||
|
case CMD_DELETE:
|
||||||
|
delete_data();
|
||||||
|
break;
|
||||||
|
case CMD_READ:
|
||||||
|
read_data();
|
||||||
|
break;
|
||||||
|
case CMD_SAVE:
|
||||||
|
save_data();
|
||||||
|
break;
|
||||||
|
case CMD_PRINT:
|
||||||
|
print_data();
|
||||||
|
break;
|
||||||
|
case CMD_SORT:
|
||||||
|
sort_data();
|
||||||
|
break;
|
||||||
|
case CMD_CHART:
|
||||||
|
make_chart();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
puts("命令错误,请重新选择");
|
||||||
|
break;
|
||||||
|
case CMD_QUIT:
|
||||||
|
if (confirm("确定要退出吗?"))
|
||||||
|
quit(); // 仅在确认后退出
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 函数定义
|
||||||
|
void init(void)
|
||||||
|
{
|
||||||
|
puts("程序启动");
|
||||||
|
}
|
||||||
|
void quit(void)
|
||||||
|
{
|
||||||
|
puts("程序退出");
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
void display_menu(void)
|
||||||
|
{
|
||||||
|
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 make_choice(void)
|
||||||
|
{
|
||||||
|
int c; // 用户输入
|
||||||
|
int n = 0; // 正确读入的数据项个数
|
||||||
|
while (n == 0)
|
||||||
|
{
|
||||||
|
printf("请选择:");
|
||||||
|
n = scanf("%d", &c); // 尝试读入整数 c
|
||||||
|
scanf("%*[^\n]"); // 跳过一行中剩余的字符
|
||||||
|
}
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询
|
||||||
|
void query_data(void)
|
||||||
|
{
|
||||||
|
int num;
|
||||||
|
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 print_data(void)
|
||||||
|
{
|
||||||
|
printf("NUMBER | NAME score\n");
|
||||||
|
for (int i = 0; i < num_parts; i++)
|
||||||
|
{
|
||||||
|
printf("%d | %s %d\n", stu[i].number, stu[i].name, stu[i].score);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加
|
||||||
|
void add_data(void)
|
||||||
|
{
|
||||||
|
int num;
|
||||||
|
printf("输入学生学号:");
|
||||||
|
scanf("%d", &num);
|
||||||
|
int f = 0;
|
||||||
|
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 update_data(void)
|
||||||
|
{
|
||||||
|
int num;
|
||||||
|
printf("输入学生学号:");
|
||||||
|
scanf("%d", &num);
|
||||||
|
int f = 0;
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
void delete_data(void)
|
||||||
|
{
|
||||||
|
int num;
|
||||||
|
printf("输入学生学号:");
|
||||||
|
scanf("%d", &num);
|
||||||
|
int f = 0, i, j;
|
||||||
|
for (i = 0; i < num_parts; i++)
|
||||||
|
{
|
||||||
|
if (num == stu[i].number)
|
||||||
|
{
|
||||||
|
f = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (f == 0)
|
||||||
|
{
|
||||||
|
printf("学生不存在");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (j = i; j < num_parts - 1; j++)
|
||||||
|
{
|
||||||
|
stu[j] = stu[j + 1];
|
||||||
|
}
|
||||||
|
num_parts--;
|
||||||
|
printf("删除成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void read_data(void)
|
||||||
|
{
|
||||||
|
puts("读取数据");
|
||||||
|
printf("请输入文件名");
|
||||||
|
char filename[256];
|
||||||
|
scanf("%s", filename);
|
||||||
|
|
||||||
|
FILE *fp = fopen(filename, "r");
|
||||||
|
if (fp == NULL)
|
||||||
|
{
|
||||||
|
perror(filename);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int i = 0;
|
||||||
|
while (fscanf(fp, "%d,%[^,],%d", &stu[i].number, stu[i].name, &stu[i].score) == 3)
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
fclose(fp);
|
||||||
|
num_parts = i;
|
||||||
|
printf("读取 %d 记录\n", num_parts);
|
||||||
|
}
|
||||||
|
|
||||||
|
void save_data(void)
|
||||||
|
{
|
||||||
|
puts("保存数据");
|
||||||
|
printf(" 请输入文件名");
|
||||||
|
char filename[256];
|
||||||
|
scanf("%s", filename);
|
||||||
|
FILE *fp = fopen(filename, "r");
|
||||||
|
if (fp == NULL)
|
||||||
|
{
|
||||||
|
perror(filename);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < num_parts; i++)
|
||||||
|
{
|
||||||
|
fprintf(fp, "%d,%s,%d\n", stu[i].number, stu[i].name, stu[i].score);
|
||||||
|
}
|
||||||
|
fclose(fp);
|
||||||
|
printf("保存%d 成功", num_parts);
|
||||||
|
}
|
||||||
|
|
||||||
|
//排序
|
||||||
|
void sort_data(void)
|
||||||
|
{
|
||||||
|
printf("排序\n");
|
||||||
|
for (int i = 0; i < num_parts; i++)
|
||||||
|
{
|
||||||
|
int change = 0;
|
||||||
|
static struct students t;
|
||||||
|
for (int j = 0; j < num_parts - i - 1; j++)
|
||||||
|
{
|
||||||
|
if (stu[j].number > stu[j + 1].number)
|
||||||
|
{
|
||||||
|
t = stu[j + 1];
|
||||||
|
stu[j + 1] = stu[j];
|
||||||
|
stu[j] = t;
|
||||||
|
change = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!change)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < num_parts; i++)
|
||||||
|
{
|
||||||
|
int change = 0;
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
printf("NUMBER | NAME score\n");
|
||||||
|
for (int i = 0; i < num_parts; i++)
|
||||||
|
{
|
||||||
|
printf("%d | %s ", stu[i].number, stu[i].name);
|
||||||
|
for (int j = 0; j < stu[i].score; j++)
|
||||||
|
{
|
||||||
|
printf("*");
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
printf("图表\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
int confirm(const char *msg)
|
||||||
|
{
|
||||||
|
char c = 'n'; // 默认选择是 no
|
||||||
|
printf("%s(Y/N): ", msg); // 提示输入 yes/no 进行确认
|
||||||
|
scanf(" %c%*[^\n]", &c); // 读取第一个字符,忽略剩余字符
|
||||||
|
return c == 'y' || c == 'Y'; // 返回确认结果
|
||||||
|
}
|