航空客運訂票系統

2021-06-16 15:17:40 字數 2807 閱讀 6650

通過此系統可以實現如下功能:

錄入:可以錄入航班情況(資料可以儲存在乙個資料檔案中,資料結構、具體資料自定);

查詢:可以查詢某個航線的情況(如,輸入航班號,查詢起降時間,起飛抵達城市,航班票價,票價折扣,確定航班是否滿倉);可以輸入起飛抵達城市,查詢飛機航班情況;

訂票:(訂票情況可以存在乙個資料檔案中,結構自己設定)可以訂票,如果該航班已經無票,可以提供相關可選擇航班;

修改航班資訊:當航班資訊改變可以修改航班資料檔案

要求:根據以上功能說明,設計航班資訊,訂票資訊的儲存結構,設計程式完成功能;

#include

#include

#include

#include

typedef struct plane

planeline;

planeline line[1000];

typedef struct buyinfo

buy;

buy dingdan;

int i;//記錄錄入航班資訊總數

input()//錄入航班資訊

i=0;

while(!feof(fp))

i--;

fclose(fp);

printf("錄入成功!\n");

return;

}find()//查詢航班情況

line[j].rest[p]='\0';

for(l=0,k=10; k<=17; l++,k++)

fprintf(f1,"%s %-6s %s %s %s %-6s\n",dingdan.buynum,dingdan.name,dingdan.card,dingdan.planenum,dingdan.count,dingdan.nowstate);

printf("%s %-6s %s %s %s %-6s\n",dingdan.buynum,dingdan.name,dingdan.card,dingdan.planenum,dingdan.count,dingdan.nowstate);

if((fp=fopen("f:\\planeline.txt","r+"))==null)

fseek(fp,j*49,0);

fprintf(fp,"%s %s %s %s %s %s %s ",line[j].planenum,line[j].time,line[j].type,line[j].arrivepoint,line[j].price,line[j].discount,line[j].rest);

fclose(fp);

}else printf("本訂單已取消!\n");

break;

}else

line[k].rest[p]='\0';

for(l=0,k=10; k<=18; l++,k++)

fprintf(f1,"%s %-6s %s %s %s %-6s\n",dingdan.buynum,dingdan.name,dingdan.card,dingdan.planenum,dingdan.count,dingdan.nowstate);

printf("%s %-6s %s %s %s %-6s\n",dingdan.buynum,dingdan.name,dingdan.card,dingdan.planenum,dingdan.count,dingdan.nowstate);

if((fp=fopen("f:\\planeline.txt","r+"))==null)

fseek(fp,j*49,0);

fprintf(fp,"%s %s %s %s %s %s %s ",line[i].planenum,line[i].time,line[1].type,line[i].arrivepoint,line[i].price,line[i].discount,line[i].rest);

fclose(fp);

}if(g==0)printf("你又調皮了!\n");}}

}}if(ok)printf("這個真沒有!\n");

fclose(f1);}}

return()//退票

l=0;

while(!feof(f1))

fseek(f1,l*52,0);

fprintf(f1,"%s %-6s %s %s %s %-6s",dingdan.buynum,dingdan.name,dingdan.card,dingdan.planenum,dingdan.count,dingdan.nowstate);

fclose(f1);

x=0;

while(!feof(fp))

line[x].rest[p]='\0';

fseek(fp,x*49,0);

fprintf(fp,"%s %s %s %s %s %s %s\n",line[x].planenum,line[x].time,line[x].type,line[x].arrivepoint,line[x].price,line[x].discount,line[x].rest);

fclose(fp);

return;

}x++;

}printf("訂單已經取消\n");

}else

}l++;}}

fix()//修改航班資訊

scanf("%d",&s);

if(s==0)break;

else if(s==1)

else break;

}printf("增加成功!\n");

}else if(s==2)

printf("請輸入要取消的航班號:");

scanf("%s",a);

for(x=0; x}

}

航空客運資訊挖掘

這個是泰迪杯資料探勘第一屆競賽中的賽題,博主在此是將官網上的優秀 進行了部分摘抄並做了乙個總結。官網位址 題目 很多人都聽說過馬來西亞的亞洲航空 美國的西南航空等公司的大名。這些公司成功的秘訣就是擅於提高上座率。本例就是期望從航空公司感興趣的主題,例如流失 客戶細分和客戶價值評估等方面,通過資料探勘...

簡易航空訂票系統 模擬航空管制員最新版

模擬航空管制員一款模擬經營航空公司還可以開飛機的遊戲,打造屬於自己的航空機隊,管理好自己的飛機並且制定航線,做一位合格的管制員,還可以自己駕駛飛機在天上翱翔,賺到錢了還可以擴張,需要使用金錢買飛機。打造全世界最棒的航空公司,並管理數十架客機。從交通樞紐駕駛航班飛行,開啟數千條航線,前往世界各地的大型...

船艙訂票系統測試

package com.dong.mytest.demo.other.yan import j a.util.arraylist import j a.util.hashmap import j a.util.iterator import j a.util.list import j a.util...