教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 文库大全 > 初中教育 >

《高级语言程序设计大作业》迷宫

来源:网络收集 时间:2024-05-18
导读: 课程简介 华南理工大学本科课程教学大纲基本格式 《高级语言程序设计大作业》教学大纲 总学时:64 理论课学时: 实验课学时:64 一、 课程的性质 实践课 二、 课程的目的与教学基本要求 本课程是学生学完《高级语言程序设计》课程后,必须完成的一门实践课程

课程简介

华南理工大学本科课程教学大纲基本格式

《高级语言程序设计大作业》教学大纲

总学时:64 理论课学时: 实验课学时:64

一、 课程的性质 实践课

二、 课程的目的与教学基本要求

本课程是学生学完《高级语言程序设计》课程后,必须完成的一门实践课程。目的是通过本课程,培养学生实际分析问题、编程和动手能力,最终目标是通过大作业的形式,帮助学生系统掌握《高级语言程序设计》课程的主要内容,为后续的专业课程的学习打好坚实的基础,使学生在以后的学习和工作中,能够自如地利用程序设计语言完成各种研究、设计和开发任务。

本课程要求学生利用在高级语言程序设计课程里所学的知识和原理,在任课教师的指导下,完成一些设计项目。学生的成绩根据所完成的设计项目情况、作业报告的质量等方面来评定。 三、 课程适用专业 计算机类专业

四、 课程的教学内容、要求与学时分配 本课程由2个作业组成: 1、 结构化程序设计大作业

要求:(1)针对实际问题,用结构化方式进行分析和设计;(2)正确定义和使用基本数据结构,包括数组、链表等;(3)用高级语言编写程序,

设计测试用例测试并完善程序;(4)书写作业报告。 2、 面向对象程序设计大作业

要求:(1)针对实际问题,用面向对象思想分析和建立应用程序模型;(2)设计一个不少于3层类体系结构的类库;(3)编写界面简洁、功能实用的类库应用程序;(4)书写作业报告。

两个作业的学时分配如下表所示:

五、课程考核方式

根据所完成的设计项目情况以及作业报告的质量来评定。

参考评价标准

1) 程序比较复杂,全部作对并能进行正确测试,文档齐全给80~85分。能对

局部进行完善,即可加分。

2) 全部作对但测试欠缺,给75~80分。程序有部分错误,根据情况给70~75

分。

3) 为鼓励学生的积极性,允许相互讨论,鼓励他们将这个实验完成,但不允

许复制代码。如果是有雷同现象,给予不及格。 归档材料

(1)作业报告。

(2)源程序代码(cpp文件,h文件,dsp文件,dsw文件), 可执行程序。

华南理工大学课程考核双向细目表

课程名称:《高级语言程序设计大作业》 课程代码:

考核对象、课程类别: 计算机类专业 开课单位: 计算机科学与工程学院

Part 1 Maze Traversal

1. (Maze Traversal) The grid of hashes (#) and dots (.) in Fig.1 is a two-dimensional array representation of a maze. In the two-dimensional array, the hashes represent the walls of the maze and the dots represent squares in the possible paths through the maze. Moves can be made only to a location in the array that contains a dot.

# # # # # # # # # # # #

# . . . # . . . . . . # . . # . # . # # # # . # # # # . # . . . . # . # # . . . . # # # . # . . # # # # . # . # . # . # # . . # . # . # . # . # # # . # . # . # . # . # # . . . . . . . . # . # # # # # # # . # # # . # # . . . . . . # . . . # # # # # # # # # # # # #

Fig. 1 Two-dimensional array representation of a maze.

There is a simple algorithm for walking through a maze that guarantees finding the exit (assuming that there is an exit). If there is not an exit, you will arrive at the starting location again. Place your right hand on the wall to your right and begin walking forward. Never remove your hand from the wall. If the maze turns to the right, you follow the wall to the right. As long as you do not remove your hand from the wall, eventually you will arrive at the exit of the maze. There may be a shorter path than the one you have taken, but you are guaranteed to get out of the maze if you follow the algorithm.

Write recursive function mazeTraverse to walk through the maze. The function should receive arguments that include a 12-by-12 character array representing the maze and the starting location of the maze. As mazeTraverse attempts to locate the exit from the maze, it should place the character X in each square in the path. The function should display the maze after each move, so the user can watch as the maze is solved.

2.(Generating Mazes Randomly) Write a function mazeGenerator that takes as an argument a two-dimensional 12-by-12 character array and randomly produces a maze. The function should also provide the starting and ending locations of the maze. Try your function mazeTraverse from Exercise 1, using several randomly generated mazes.

3.(Mazes of Any Size) Generalize functions mazeTraverse and mazeGenerator of Exercise 1 and Exercise 2 to process mazes of any width and height.

1。(迷宫遍历)网格的散列(#)和点(.)在一个迷宫的图1是一个二维数组表示。在二维数组中,散列表示迷宫的墙壁和可能的路径中的点代表广场穿过迷宫。移动可以只有一个位置的数组,其中包含一个点。 有一个简单的穿过迷宫算法保证找到退出(假设有一个退出)。如果没有一个出口,你将再次到达起始位置。把你的右手放在你右边的墙,开始向前走。永远不会把你的手从墙上。如果你遵循的迷宫转向右边,右边的墙。只要你不把你的手从墙上,最终你会到达迷宫的出口。可能会有比你更短的路径,但是你保证走出迷宫如果你遵循这个算法。

编写递归函数mazeTraverse穿过迷宫。该函数应该接受参数,包括12-by-12字符数组代表迷宫,迷宫的起始位置。mazeTraverse试图找到迷宫的出口,它应该把字符X每平方的路径。函数应该显示迷宫每次移动后,用户可以看到迷宫是解决。

2。(随机生成迷宫)写一个函数mazeGenerator需要作为参数二维12-by-12字符数组和随机产生一个迷宫。函数还应该提供的起始和结束位置迷宫。试一试你的函数mazeTraverse从练习1,使用几个随机生成迷宫。 3所示。(任何尺寸的迷宫)概括函数mazeTraverse和mazeGenerator锻炼1和锻炼2处理任何宽度和高度的迷宫。

附件二: 参考作业报告模板

《高级语言程序设计》作业报告

作业名称:

学 院 专 业 学生姓名 任课教师 提交日期

一、问题描述

简述题目要解决的问题是什么,规定软件做什么。

二、系统设计 1、体系设计 2、应用程序设计

三、程序测试 1. 设计测试用例 2. 程序测试结果

四、使用说明

五、收获体会及建议

《高级语言程序设计大作业》迷宫.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wenku/1557848.html(转载请注明文章来源)
Copyright © 2020-2021 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)