1、 汉诺塔游戏 课程设计说明书 学生姓名: 学 号: 院 系: 信息工程学院 专 业: 信息管理与信息系统 班 级: 信息 12 本 1 指导教师: 答辩时间: 年 月 日 数据结构课程设计 目录 摘要 第一章 绪论. 错误错误! !未定义书签。未定义书签。 1. 数据结构简介 . 1 2. 应用技术领域及范围 . 1 3. 设计的原理、方法和主要内容 . 1 第二章 需求分析. 错误错误! !未定义书签。未定义书签。 1. 汉诺塔的由来 . 2 2. 汉诺塔与宇宙寿命 . 4 3. 设计目的 . 3 4. 设计需求 . 4 5. 问题分析 . 4 第三章 概要设计. 5 1. 设计思想 . 5
2、 2. 实现方法 . 5 3. 主要模块 . 5 4. 模块关系 . 5 第四章 详细设计 5 1. 功能设计 . 5 2. 算法分析 . 6 3. 编写程序 . 6 4. 程序执行过程分析 . 7 5. 调试分析 . 8 总总结结 9 参考文献参考文献 9 汉诺塔游戏 摘要摘要 随着时代的不断发展进步,计算机已经融入我们的日常生活。很多时候,很多的问题想 通过人的手来亲自解决已变得十分困难了, 这时我们就要运用计算机来帮我们解决这些复杂 的问题。汉诺塔问题就是这类较复杂的问题。 汉诺塔游戏规则:有三根针 A,B,C。A 针上有 n 个盘子,盘子大小不等,大的在下, 小的在上。要求把这 n 个
3、盘子移到 C 针,在移动过程中可以借助 B 针,每次只允许移动一个 盘子,且在移动过程中在三根针上的盘子都保持大盘在下,小盘在上。 此次,我们通过 Visual C+软件运用递归算法来解决汉诺塔问题。程序运行后会出现 一个界面, 界面上有各种操作提示, 按照提示进行各种操作后会得到汉诺塔游戏的运行过程 及结果。 关键字:汉诺塔;Visual C+软件;递归算法 数据结构课程设计 Abstract With the continuous development and progress of the times, the computer has been integrated into our
4、 daily life. Most of the time, a lot of problems through his hand to solve personally has become very difficult, then we will use the computer to help us to solve the complicated problem. Tower of Hanoi problem is this kind of complicated problem. Tower of Hanoi game rules: three pin A, B, C. The A
5、pin on the N plate, the plate size, the next big, small In. The requirements of these n plate moved to the C pin, in the process of moving can make use of B needle, each time only allowed to move in a plate, and in the process of moving the three needle plate to maintain the market in the next, smal
6、l cap on. The Visual C+ software, we use a recursive algorithm to solve the tower of Hanoi problem. The program to run after an interface, the interface with various operating tips, follow the prompts to perform various operations will be running process and the result of the game. Keywords: Hanota; Visual C+; recursive algorithm 汉诺塔游戏 1 第一章 绪论 1. 数据结构简介 数据结构是计算机程序设计的重要理论设计基础, 它不仅是计算机学科的核心课程, 而 且成为其他理工专业的热门选修课。 数据结构是指相互之间存在一种或多种特定关系的数据