资源描述:
《校园导游咨询系统课程设计报告》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、福建农林大学计算机与信息学院计算机类课程设计报告课程名称:数据结构课程设计题目:校园导游咨询系统姓名:系:计算机专业:计算机科学与技术年级:07级学号:指导教师:职称:副教授2008年06月30日目录一、需求分析3二、概要设计4三、详细设计6四、设计和调试分析10五、用户手册11六、测试结果121.操作命令符为s/S,122.操作命令符为v/V,133.操作符为v/V,134.操作符为e/E,135.综上可以查得:14七、附录14参考文献15校园导游咨询系统一、需求分析1.从福建农林大学的平面图中选取28个有代
2、表性的景点,抽象成一个无向带权图。以图中顶点表示景点,边上的权值表示两地间的距离。2.本程序的目的是为了用户提供路径咨询,根据用户指定的始点和终点输出相应路径,或者根据用户指定的景点输出景点的信息。3.测试数据(附后)。二、概要设计1.抽象数据类型图的定义如下:ADT{structarcnode{intv;intw;structarcnode*next;};structnode{intdegree;structarcnode*first;}adjlist[28];}2.主程序Voidmian(){初始化临接矩阵
3、windows();//初始化串口getch();}3.函数定义的变量#defineinfi32767#defineMAX28intM,N;//无向图中的顶点M,无向图的变数intadjmatrix[MAX][MAX];//保存临接矩阵的2唯数组char*schoolIfo[MAX+1]={//此数组用于界面显示信息"null","东台-dt","金1-j1","金2-j2","金3-j3","金4-j4","食堂-st","田径场-tjc","校大门-xdm","创业园-cyy","校医院-xyy","图书馆
4、-tsg","映辉桥-yhq","观音湖-gyh","成教楼-cjl","生物楼-swl","博学楼-bxl","创新楼-cxl","明德楼-mdl","拓荒广场-thgc","南区公寓-nqgy","田家炳楼-tjbl","农大新区-ndxq","中华广场-zhgc","905终点站-zdz","蜂疗医院-flyy","研究生公寓-yjsgy","昌融学生街-crxsj","北区学生公寓-bqxsgy"};char*charcd2[MAX]={//用于显示最短路径时走向的数组"校大门","金1","昌融学生街
5、","创业园","东台","金2","田径场","拓荒广场","南区公寓","校医院","食堂","成教楼","创新楼","田家炳楼","农大新区","观音湖","金3","映辉桥","金4","明德楼","中华广场","905终点站","蜂疗医院","生物楼","博学楼","图书馆","研究生公寓","北区学生公寓"};char*charcd[MAX]={//用于用户输入起始点与终止点时对应的数组"xdm","j1","crxsj","cyy","dt","j2","tjc","thgc","nqgy","x
6、yy","st","cjl","cxl","tjbl","ndxq","gyh","j3","yhq","j4","mdl","zhgc","zdz","flyy","swl","bxl","tsg","yjsgy","bqxsgy"};char*infor[MAX]={//介绍景点信息数组"校大门:占不提供介绍","金1:指金山大道的一处,由图可知","昌融学士街:农大的小吃一条街,来农大一定要来尝尝!","创业园:农大创业有志者的孵化地","东台:农大老师所住之处","金2:金山大道
7、的第二处有图可看出","田径场:农大的运动场地","拓荒广场:大礼堂就在此处","南区公寓:顾名思意,学生公寓","校医院:希望你不要来","食堂:学校八九十食堂都在这,不错蛮好吃的。","成教楼:成人教育教学大楼","创新楼:教学处","田家炳楼:教学楼","农大新区:此处景点很多,由于时间不多.占不介绍。你自己看看,不错的....","观音湖:来农大必到之处,口碑也非常好,来了就一定要去","金3:金山大道第三处分叉口","映辉桥:情人之桥美丽而烂漫,值得留恋
8、","金4:金山大道第四处分叉口","明德楼:学校的最高建筑","中华广场:学校最好的照相之处,那是相当漂亮哦","终点站,你离开农大再来我这吧!","蜂疗医院:学校特色,其他学校可没有","生物楼:搞研究的","博学楼:搞化学方面的","图书馆:不错,可以来看看","研究生公寓:不要介绍了吧","北区学生公寓:不要说你不懂哦"};voidwindo