数据结构课程设计 校园导游系统.docVIP

  • 42
  • 0
  • 约 11页
  • 2015-12-19 发布于浙江
  • 举报
数据结构课程设计 校园导游系统.doc

西安郵電學院 目:校园导游系统 院系名称: 计算机学院 专业名称: 计算机科学与技术 班 级: 学生姓名: 学号(8位) 指导教师: 设计起止时间:2011年月日~20年月日 一. 设计目的 二. 设计内容 — 这是西安邮电学院的一个校园导游图,内容有:管理员管理(有地图的输入,保存文件);客户访问(景点查询,景点打印,景点信息,最短路线查询)。 三.概要设计 1.功能模块图; 校园导游系统 — Y N 2.各个模块详细的功能描述。 —三个选项:1.Administrator Login—管理员登陆; 2.Client Access—客户登 陆 ;0.Exit the system—退出系统。 三个选项:1.Input Attractions Map—输入地图信息;2.Back to the main Menu—返回主菜单;0.Exit the system—退出系统。 六个选项:1.List of the Attractions—列出景点;2.Print the vertexs information – 打印景点信息;3.Find attractions—景点查询;4.Search the shortest path—最短路径查询;5.Back to the main menu—返回主菜单;0.Exit the system—退出系统。 四.详细设计 1.功能函数的调用关系图 — 系统中的所有函数如下: void main(); void Cipher ();//密码 void MainMenu ();//主菜单 void AdministratorMenu ();//管理员菜单 void CustomerMenu();//客户访问菜单 int LocateVertex (AdjMatrix *G, int v);//求顶点位置函数 void CreateGraph (AdjMatrix *G);//建立图函数 void SaveGraphFile (AdjMatrix *G);//保存图到文件函数 void DiaplayGraph (AdjMatrix *G);//打印图函数 void FindAttractions ();//景点查找 void TraverseGraph ();//图的遍历 void DepthFirstSearch (AdjMatrix *G, int v0);//图的深度优先搜索 void PrintGraph ();//打印图 void ReadGraphInfoFile (AdjMatrix *g);//读取图的景点信息文件 void ReadGraphFile (AdjMatrix *g);//读取图矩阵文件 void ShortestPath_Floyd(AdjMatrix *g);//弗洛伊德算法 void ShortestPath_Print();//两点间的最短路径 函数调用关系: a b:a调用b 2.各功能函数的数据流程图 — 函数7)void CreateGraph (AdjMatrix *G);为创建图,然后,调用 8)void SaveGraphFile (AdjMatrix *G) 保存到文件啊中。 函数11),13),10),17)都需调用14),15)来读取文件中的数据。分别完成相应的功能。 3.重点设计及编码 — 程序中定义的结构体,数据: #define M 100 #define INFINITY 0 #define True 1 #define False 0 int visited[M]; int dist[M][M];//最短路径长度 int path[M][M];//最短路径 typedef struct VerInfo { int ver;//景点编号 char name[M];/景点名字/ char information[M];//景点信息 } VerInfo; typedef struct ArcNode { int adj;//权值 } ArcNode; typedef struct { VerInfo vertex[M];//顶点数组 ArcNode arcs[M][M];//邻接矩阵 int vexnum, arcnum;//定点数和弧数 } AdjMatrix; 重点函数 int LocateVertex (Ad

文档评论(0)

1亿VIP精品文档

相关文档