没有合适的资源?快使用搜索试试~ 我知道了~
数据结构课程设计交通咨询系统设计模板.doc
1 下载量 97 浏览量
2023-08-03
22:03:52
上传
评论
收藏 145KB DOC 举报
温馨提示
![preview](https://dl-preview.csdnimg.cn/88159853/0001-46d93a6263e06ac926977e61fbd3f5f0_thumbnail-wide.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
试读
55页
数据结构课程设计交通咨询系统设计模板.doc
资源推荐
资源详情
资源评论
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![txt](https://img-home.csdnimg.cn/images/20210720083642.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/release/download_crawler_static/88159853/bg1.jpg)
1
数据结构课程设计
交通咨询系统设计
![](https://csdnimg.cn/release/download_crawler_static/88159853/bg2.jpg)
资料内容仅供参考,如有不当或者侵权,请联系本人改正或者删除。
2
设计题目<二>: 7.3.4交通咨询系统设计P160
一、 设计要求
1.问题描述
根据不同目的的旅客对交通工具有不同的要求。例如,
因公出差的旅客希望在旅途中的时间尽可能的短,
出门旅行的旅客希望旅费尽可能的少,
而老年人则要求中转次数少。模拟一个全国城市之间的咨询交通
程序, 为旅客提供两种或三种最优的交通路线。
2.需求分析
二、 概要设计
1.主界面设计
( 图2.1”交通咨询系统”主菜单)
2.存储结构设计
本系统采用图结构类型存储抽象交通咨询系统的信息。
typedef struct TrafficNode
{
![](https://csdnimg.cn/release/download_crawler_static/88159853/bg3.jpg)
资料内容仅供参考,如有不当或者侵权,请联系本人改正或者删除。
3
char name[MAX_STRING_NUM]; //班次
//MAX_STRING_NUM最为10
int StartTime, StopTime; //起止时间
int EndCity; //该有向边指向的顶点在数组中的位置,
即该城市编号
int Cost; //票价
} TrafficNodeDat;
typedef struct VNode
{
CityType city;
int TrainNum, FlightNum;
//标记下面Train数组和Flight数组里元素个数
TrafficNodeDat Train[MAX_TRAFFIC_NUM];
//数组成员为结构体, 记录了到达城市、 起止时间、
票价和班次
TrafficNodeDat Flight[MAX_TRAFFIC_NUM];
// int Cost; //遍历时到达该城市的耗费( 时间或者费用)
} VNodeDat;
typedef struct PNode
{
int City;
![](https://csdnimg.cn/release/download_crawler_static/88159853/bg4.jpg)
资料内容仅供参考,如有不当或者侵权,请联系本人改正或者删除。
4
int TraNo;
} PNodeDat;
3.系统功能设计
( 1) 添加城市。添加一个城市的名称
( 2) 删除城市。输入一个城市名称, 删除该城市。
( 3) 添加交通路线。输入起始城市、 终点城市、 航班或火车、
车次、 起始时间、 终点时间和票价
( 4) 删除交通路线。输入火车或飞机的班次删除该交通路线。
( 5) 查询最小费用路线。输入起始城市、 终点城市、
航班或火车、 车次、 起始时间、 终点时间查询最小费用路线。
三、 模块设计
1.模块设计
( 图2.2 模块调用示意图)
2.系统子程序及功能设计
( 1) int ShowMenu()//主菜单
( 2) void CopyRight()
( 3) int SeekCity(char *name) //寻找城市
( 4) int InsertCity(char *Name) //添加城市
( 5) int SaveSysInfo() //向程序输入数据
( 6) int DelCity(char *Name) //删除城市
主程序模块
工作区模块
无向网操作
模块
![](https://csdnimg.cn/release/download_crawler_static/88159853/bg5.jpg)
资料内容仅供参考,如有不当或者侵权,请联系本人改正或者删除。
5
( 7) int InsertTrain(char *train, char *StartCity, char
*EndCity, int StartTime, int EndTime, int
cost)//添加火车路线
( 8) int InsertFlight(char *flight, char *StartCity, char
*EndCity, int StartTime, int EndTime, int
cost)//添加飞机航线
( 9) int DelPath(char *name)//删除路线
( 10) void Dijkstra(int matx[Dij_MAXN][Dij_MAXN], int
p_start, int p_end, int TravelType)
( 11) int InitSysData()//存储数据
( 12) int SearchMinTime(CityType City, CityType EndCity,
int CurTime, int curPathNo, int TravelType)//查询最短时间
( 13) int CalcMinTime(int StartCity, int EndCity, int
TravelType) //显示最短时间
( 14) int CalcMinCost(int StartCity, int EndCity, int
TravelType)//最少花费
( 15) int main()//主函数
3.函数主要调用关系图
15mai
n( )
8
9
1
1
2
7
5
4
1
3
6
3
6
1
2
2
3
7
1
6
剩余54页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/acfce43ffe2c41f996326bd927946824_yhsbzl.jpg!1)
智慧安全方案
- 粉丝: 3701
- 资源: 59万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)