沈航北科足球队得分统计.doc_第1页
沈航北科足球队得分统计.doc_第2页
沈航北科足球队得分统计.doc_第3页
沈航北科足球队得分统计.doc_第4页
沈航北科足球队得分统计.doc_第5页
已阅读5页,还剩23页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

北科教工足球队信息管理程序 北科教工足球队信息管理程序 张硕 目录 1 绪论绪论 1 2 系统分析系统分析 1 2 1 功能需求 1 2 2 数据需求 1 2 3 性能需求 2 3 总体设计总体设计 2 3 1 功能模块设计 2 3 2 系统设计方案 3 4 详细设计详细设计 6 4 2 输入球员信息 6 4 3 输入比赛信息 7 4 4 修改队员信息 8 4 5 删除队员信息模块 8 4 6 统计信息模块 9 4 7 计算最佳射手模块 10 4 8 球员信息模块 11 4 9 比赛信息模块 12 5 调试与测试调试与测试 13 5 1 调试 13 5 2 测试 13 6 结论结论 13 结束语结束语 14 参考文献参考文献 14 附录附录 1 用户手册 用户手册 15 附录附录 2 源程序 源程序 21 北科教工足球队信息管理程序 1 摘 要 足球队信息管理系统是一支球队不可缺少的部分 此系统可以清楚的记录 参赛对的队员信息 及比赛的基本信息 本系统使用 C 语言作为程序开发语言 开发足球队信息管理系统 键入队 员信息 可以对队员的信息进行删除 修改和查询 本文从分析课题的题目背景 题目意义 题目要求等出发 分别从需求分 析 总体设计 详细设计 测试等各个方面详细介绍了系统的设计与实现过程 最后对系统的完成情况进行了总结 关键词 足球队 最佳射手 进球队员 1 绪论绪论 足球队信息管理系统是一支球队不可缺少的部分 此系统可以清楚的记录 比赛对的队员信息 及比赛的基本信息 给教练提供一个参考 是教练管理球 队的最佳助手 大大提高了教练的工作效率 节省工作时间 使他们能有更多 的时间去思考着如何提高球队的综合实力 根据课程设计任务书要求 本系统开发主要完成以下功能和性能 1 足球队员信息管理 包括部基本的球员信息 包括 姓名 号码 年 龄 位置 部门 职务等 用户可以在系统中删除和修改足球队员信息信息记 录 2 足球比赛信息管理 基本的比赛信息 包括 对手 比分 时间 进 球队员等 3 足球比赛最佳射手信息管理 通过比较 得出进球最多的队员 4 系统管理 使用者可以对整个系统进行系统管理 保证系统的安全性 2 系统分析系统分析 2 1 功能需求功能需求 本系统主要是足球队信息简单管理的系统 本系统需要有删除 查询 修改 循环显示主菜单 保存信息功能 能计 算最佳射手 利用显示函数将足球队所有信息显示 要求有循环显示菜单工能 北科教工足球队信息管理程序 2 2 2 数据需求数据需求 需要向系统输入队员的姓名 号码 年龄 位置 部门 职务 以及比赛 的基本信息包括对手 比分 时间 进球队员 2 3 性能需求性能需求 在运行本程序时只要按照正确的操作方法不会出现无法运行的情况 系统 稳定性好 安全 可靠 3 总体设计总体设计 3 1 功能模块设计功能模块设计 根据分析整个系统主要划分为 7 个功能模块 分别执行要求中的功能 该 系统需要有添加 删除 查询 修改 累加 循环显示主菜单 保存信息功能 能将会员卡进行注销 利用显示函数将会员卡内所有信息显示 要求有循环显 示菜单工能 功能模块图如图 1 所示 北科教工足球队信息管理系统 退出 输入球员信息 输入比赛信息 修改队员信息 删除队员信息 统计 计算最佳射手 球员信息 比赛信息 图图 1 1 功能模块图功能模块图 1 退出 退出系统 2 输入球员信息 实现对新队员的一切信息的输入并保存 3 输入比赛信息 实现对新的一场比赛的信息的录入 北科教工足球队信息管理程序 3 4 修改队员信息 对队员的信息进行修改 包括 姓名 号码 年龄 位置 部门 职务 5 删除队员信息 实现对队员信息的删除 6 统计 统计出各个位置的球员数量及总数 7 球员信息 显示出全部球员的所以信息 8 球员信息 显示出全部比赛的所以信息 3 2 系统设计方案系统设计方案 设计一个总菜单 1 退出 2 输入球员信息 3 输入比赛信息 4 修改队员 信息 5 删除队员信息 6 统计 7 球员信息 8 比赛信息 基本功能的实现都 将体现在这几个菜单选项中 建立结构体如下 struct teacher 球员信息 char name 20 int number int age char location 10 char department 10 char post 10 int m struct teacher next struct information 比赛信息 char name a 20 char name b 20 int score a int score b int time 6 北科教工足球队信息管理程序 4 char football a 20 20 char football b 20 20 struct information next 根据模块需要本系统需要用到链表结构 struct teacher del struct teacher head int number 删除 struct teacher correct struct teacher head int number 修改 struct teacher total struct teacher head 统计 struct teacher best struct teacher head 计算最佳射手 struct teacher print struct teacher head 输出队员信息 struct information print s struct information head 输出比赛信息 4 4 详细设计详细设计 4 1 输入球员信息输入球员信息 设三个指针变量 head p1 p2 都是用来指向 struct teacher 类型数据 用 malloc 函数开辟一个新节点 使 p1 p2 指向它 从键盘读入球员的 number 若为 0 建立链表的过程完成 不为 0 则继续 先使 head 等于 NULL 当链表 开始创建时 再使 head 指向它 然后依次输入球员其他信息 在开辟下一个节 点时 p2 每次都是紧跟着 p1 并且在 p1 指向下一个节点之前 p2 指向 p1 最 后创建结束 把 p2 赋值为 NULL 北科教工足球队信息管理程序 5 开始 输入 1 head NULL 输入队员的号码 number number 0 按提示输入 信息 count 1head p1 p2 next p1 p2 p1 输入队员的号码 number p2 next NULL 结束 Y N Y N 图图 2 输入队员信息流程图输入队员信息流程图 4 2 输入比赛信息输入比赛信息 设三个指针变量 head p1 p2 都是用来指向 struct teacher 类型数据 用 malloc 函数开辟一个新节点 使 p1 p2 指向它 从键盘读入球员的 number 若为 0 建立链表的过程完成 不为 0 则继续 先使 head 等于 NULL 当链表 开始创建时 再使 head 指向它 然后依次输入球员其他信息 在开辟下一个节 点时 p2 每次都是紧跟着 p1 并且在 p1 指向下一个节点之前 p2 指向 p1 最 后创建结束 把 p2 赋值为 NULL 北科教工足球队信息管理程序 6 开始 输入 2 head NULL 输入A队得分score a number 0 按提示输入 信息 count 1head p1 p2 next p1 p2 p1 输入A队得分 score a p2 next NULL 结束 Y N Y N 图图 3 输入比赛信息流程图输入比赛信息流程图 4 3 修改队员信息修改队员信息 定义一个指针 temp 先使之指向第一个节点 如果要修改的不是第一个节 点 则使 temp 移动到下一个节点 直到找到要删除的 或者移到链表尾结束 找到要修改的队员的号码 输入修改后的信息覆盖原有信息 没有找到就提示 norrow 北科教工足球队信息管理程序 7 开始 输入 3 head NULL temp number numbertemp temp next temp number number 输入对应要修改 的信息 结束 N Y Y 输出 norrow N 图图 3 修改队员信息流程图修改队员信息流程图 4 4 删除队员信息模块删除队员信息模块 先定义两个头指针 p1 p2 找到要删除的队员号码 如果队员号码是链表的头 则将 head 赋给此会员所存结点的 next 此队员所存结点不是头结点就将此队员 上一个结点的 next 与此队员的结点的 next 相连 北科教工足球队信息管理程序 8 开始 输入 4 head NULL 输出 norrow temp number number int number int age char location 10 char department 10 char post 10 int m struct teacher next struct information char name a 20 char name b 20 int score a int score b int time 6 char football a 20 20 char football b 20 20 struct information next void list printf n printf 0 结束 n printf 1 输入球员信息 n printf 2 输入比赛信息 n printf 3 修改队员信息 n printf 4 删除队员信息 n printf 5 统计 n printf 6 计算最佳射手 n printf 7 球员信息 n printf 8 比赛信息 n printf int count 北科教工足球队信息管理程序 21 struct teacher create struct teacher head NULL struct teacher p1 p2 count 0 p2 p1 struct teacher malloc sizeof struct teacher printf 输入队员的号码 scanf d while p1 number 0 count if count 1 head p1 else p2 next p1 p2 p1 printf 输入队员的姓名 scanf s printf 输入队员的年龄 scanf d printf 输入队员的位置 scanf s printf 输入队员的部门 scanf s printf 输入队员的职务 scanf s printf 输入进球数 scanf d count p1 struct teacher malloc sizeof struct teacher printf 输入队员的号码 scanf d p2 next NULL free p1 return head int count1 struct information create1 北科教工足球队信息管理程序 22 int i time 6 struct information head NULL struct information p1 p2 count1 0 p2 p1 struct information malloc sizeof struct information printf A 队得分 scanf d while p1 score a 0 count1 if count1 1 head p1 else p2 next p1 p2 p1 printf B 队得分 scanf d printf A 队 scanf s printf B 队 scanf s printf 输入比赛时间 年月日时分 for i 0 itime i if p1 score a 0 printf 输入 A 队进球球员姓名 for i 0 iscore a i scanf s if p1 score b 0 printf 输入 B 队进球球员姓名 for i 0 iscore b i scanf s p1 struct information malloc sizeof struct information printf A 队得分 北科教工足球队信息管理程序 23 scanf d p2 next NULL free p1 return head struct teacher del struct teacher head int number struct teacher temp p temp head if head NULL printf norrow n temp head while temp number number temp temp next if temp number number if temp head head temp next else p next temp next else printf norrow n return head struct teacher correct struct teacher head int number struct teacher temp p temp head if head NULL printf norrow n else temp head while temp number number p temp temp temp next 北科教工足球队信息管理程序 24 if temp number number printf 输入队员新的姓名 scanf s printf 输入队员新的号码 scanf d printf 输入队员新的年龄 scanf d printf 输入队员新的位置 scanf s printf 输入队员新的部门 scanf s printf 输入队员新的职务 scanf s printf 输入进球数 scanf d return head struct teacher total struct teacher head struct teacher temp p int x 0 y 0 z 0 b 0 temp head if head NULL printf norrow n else temp head while temp next NULL else if strcmp temp location zhongfeng 0 y else if strcmp temp location houwei 0 z p temp temp temp next if temp next NULL else if strcmp temp location zhongfeng 0 y else if strcmp temp location houwei 0 z b x y z 1 printf 前锋 d 人 中锋 d 人 后卫 d 人 守门员 1 人 总人数 d 人 n x y z b return head struct teacher best struct teacher head struct teacher temp p int x 0 temp head if head NULL printf norrow n else while temp next NULL if temp m x x temp m p temp temp temp next if temp m x x temp m temp head while temp next NULL if temp m x printf 最佳射手是 s n temp name temp temp next if temp m x 北科教工足球队信息管理程序 26 printf 最佳射手 s n temp name return head struct teacher print struct teacher head struct teacher p head if p NULL printf 没有成员 printf 姓名 编号 年龄 位置 部门 职务 n while p NULL printf s d d s s s n p name p number p age p location p department p post p p next return head struct information print s struct information head int i struct informa

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论