freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

停車場(chǎng)管理系統(tǒng)及課程設(shè)計(jì)報(bào)告(參考版)

2024-09-04 20:08本頁面
  

【正文】 //建立并且初始化用于通道的隊(duì)列 showmenu(carstack,carqueue)。// 建立并且初始化用于停車場(chǎng)的堆棧 Queue carqueue。 } int main() { CarStack carstack。e39。amp。E39。 cinch。 } char ch。 case 3: return 。 OutCar(S,Q,a2,a1)。 cout請(qǐng)輸入離開的時(shí)間 endl。 case 2: cout請(qǐng)輸入離開的車號(hào) endl。 InCar(S,Q,a2,a1)。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì) .停車場(chǎng)管理系統(tǒng) 第 47 頁 共 97 頁 cout請(qǐng)輸入到達(dá)時(shí)間 endl。 switch(tag) { case 1: cout請(qǐng)輸入到達(dá)的車號(hào) endl。 int a1。amp。amp。 cintag。 cout***************************** 請(qǐng) 按 鍵 選 擇******************************endl。 cout 2: 離開 endl。Q) { cout****************************** 選擇菜單*******************************endl。 } void showmenu(CarStack amp。amp。 Push(S,temp)。 = 。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì) .停車場(chǎng)管理系統(tǒng) 第 46 頁 共 97 頁 =a1 。tag3==false) { DeQueue(Q,tempqnode)。tag2==falseamp。//用來暫時(shí)保存從通道出來的汽車 if(tag1==trueamp。 Push(S,temp)。 } else Push(tempstack ,temp)。} else cout 車號(hào) a2 現(xiàn) 在離 開停 車場(chǎng) ,所 用的 時(shí)間 為 收費(fèi)為( )*FAREendl。 tag3=true。//用來標(biāo)志是否是離開時(shí)間小于到達(dá)時(shí)間而導(dǎo)致離開失敗, true 表示離開失敗 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì) .停車場(chǎng)管理系統(tǒng) 第 45 頁 共 97 頁 while(1)//讓車離開 { Pop(S,temp)。 CarNode temp。 bool tag2=true。//建立并且初始化用于暫存出車時(shí)讓車的堆棧 bool tag1=false。 } CarStack tempstack。} if(!SearchInStack(S,a2)) { cout車號(hào) a2不在停車場(chǎng)內(nèi),輸入有誤 endl。Q,int a1,int a2)//此函數(shù)用來出車,參數(shù) a1 用來表示離開時(shí)間,參數(shù) a2 表示車牌號(hào)碼 { if(SearchInQueue(Q,a2)) { cout車號(hào) a2存在于通道內(nèi),還未進(jìn)入停車場(chǎng),不能離開 endl。} } void OutCar(CarStack amp。 ++CountForStack。 =a2。A39。 =a1。 cout 車號(hào): 停在通道的第CountForQueue號(hào)位置 endl。 EnQueue(Q,qnode)。 =1。//在通道時(shí)間不收費(fèi),所以不計(jì)時(shí) =39。 } if(IsStackFull(S))//如果堆棧已滿,說明停車場(chǎng)已滿,需要停車在通道 { QNode qnode。 } if(SearchInQueue(Q,a2)) 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì) .停車場(chǎng)管理系統(tǒng) 第 43 頁 共 97 頁 { cout車號(hào) a2已經(jīng)存在于通道內(nèi),輸入有誤 endl。Q,int a1,int a2)//此函數(shù)用來表示進(jìn)入車輛 , 參數(shù) a1 用來表示到達(dá)時(shí)間,參數(shù) a2 表示車牌號(hào)碼 { if(SearchInStack(S,a2)) { cout車號(hào) a2已經(jīng)存在于停車場(chǎng)內(nèi),輸入有誤endl。} void InCar(CarStack amp。 }//退出此 while 循環(huán)時(shí) p 指向最后一個(gè)元素 if((*p).License ==a) tag=true。 if(!IsQueueEmputy(Q))//如果隊(duì)列非空 { QNode *p=next 。} bool SearchInQueue(Queue amp。} if((*p).License ==a) tag=true。 while(p!= ) 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì) .停車場(chǎng)管理系統(tǒng) 第 42 頁 共 97 頁 { if((*p).License ==a) tag=true。S,int a) { bool tag=false。 else return false。} bool IsQueueEmputy(Queue amp。S)//此函數(shù)用來判斷堆棧是否為空 { if( == ) return true。 else return false。} bool IsStackFull(CarStack amp。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì) .停車場(chǎng)管理系統(tǒng) 第 41 頁 共 97 頁 =(* ).License 。 =(* ).Condition 。} 。t)//此函數(shù)用來彈出棧內(nèi)元素 { if( == ) { cout???,不能執(zhí)行出棧操作! endl。} bool Pop(CarStack amp。 ++ 。 (* ).LeaveTime = 。} (* ).ArriveTime = 。car)//此函數(shù)用來入棧一個(gè)CarNode 節(jié)點(diǎn) { if( = ) { cout此棧已滿,不能壓入新的信息 endl。} bool Push(CarStack amp。 =leavetime。C,char condition,int arrivetime,int leavetime,int license)//本函數(shù)用來初始化一個(gè) CarNode 節(jié)點(diǎn) { =arrivetime。 return true。 if( ==p)//如果 P 是指向最后一個(gè)出隊(duì)的元素 = 。 =pLicense 。 =pCondition 。} QNode *p=next 。t)//此函數(shù)用來出隊(duì) { if( == ) { cout隊(duì)列為空! endl。} bool DeQueue(Queue amp。 =p。 pnext =0。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì) .停車場(chǎng)管理系統(tǒng) 第 39 頁 共 97 頁 pLeaveTime = 。} pArriveTime = 。 if(!p) { cout內(nèi)存分配失敗! endl。Q,QNode amp。//下一個(gè)節(jié)點(diǎn)指空 return true。} = 。 if(! ) { cout內(nèi)存分配失?。?endl。} bool InitQueue(Queue amp。 =MAX_SIZE。 return false。S)//此函數(shù)用來初始化棧 { =(CarNode *)malloc(MAX_SIZE*sizeof(CarNode))。//隊(duì)尾指針 }Queue。 typedef struct// 隊(duì)列的定義 { QNode *front。// 記錄車牌號(hào) QNode *next。//用來記錄到達(dá)時(shí)間,默認(rèn)為 1,說明還沒有到達(dá) int LeaveTime。 typedef struct QNode//隊(duì)列節(jié)點(diǎn)的定義 { char Condition 。//棧頂指針,如果指向 0,說明棧為空 int stacksize。 typedef struct //棧的定義 { CarNode *base。// 用來記錄離開時(shí)間,默認(rèn)為 1,說明還沒有離開 int License。//用來表示“到達(dá)”或者“離開”的狀態(tài) , 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì) .停車場(chǎng)管理系統(tǒng) 第 37 頁 共 97 頁 int ArriveTime。// 此全局變量用來計(jì)數(shù)堆?,F(xiàn)有的車數(shù) int CountForQueue=0。 } 二 includeiostream includefstream using namespace std。))。(cmd!=39。)amp。(cmd!=39。)amp。(cmd!=39。)amp。(cmd!=39。)amp。(cmd!=39。)amp。(cmd!=39。)amp。(cmd!=39。)amp。 }while((cmd!=39。 cmd = getche()。 } char readmand() /*選擇函數(shù) */ { char cmd。 printf(\n********************************************************************************)。 printf(\n********************************************************************************)。 printf(CLASS: INTERNET02)。 printf(GRADE: 2020.)。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì) .停車場(chǎng)管理系統(tǒng) 第 35 頁 共 97 頁 printf(NUM: 202020020205.)。 printf(NAME: GAOHE.)。 printf(THIS IS A CAR PART MANAGE SYSYTEM!)。i++) printf(\1)。 for(i=1。 clrscr()。 break。 break。getch()。E39。 break。getch()。e39。 break。temp,amp。: Print(amp。 case 39。road)。part,amp。p39。 break。temp,amp。: Departure(amp。 case 39。road)。part,amp。d39。 break。part,amp。A39。 break。part,amp。a39。 /*讀取停車場(chǎng)狀況 */ clrscr()。 while(1) { initialization()。 printf(Press any key to continue......)。 InitQueue(amp。 InitStack(amp。 InitStack(amp。 SqStackCar part,temp。 void interpret(char cmd)。 void initialization()。 int Departure(SqStackCar *In,SqStackCar *temp,LinkQueueCar *Wait)。 getch()。 } } else printf(\nNo car in the road.)。 q=qnext。 printf( Car number is: )。 printf(The )。 q=Waitfrontnext。) /*打印便道 */ { printf(The car in the road!\n)。 } if(c==39。 } printf(Press any key to continue...)。 puts(tnum)。 printf( car number is: )。 printf(The )。 Push(Temp,t)。 count=1。239。)。c!=39。amp。c!=39。amp。 }while(c!=39。 c = getche()。 printf(3. return.)。 printf(2. Print the part!)。 printf(1. Print the road!)。) { clrscr()。c!=39。 while(1amp。 p=(CarNode *)malloc(sizeof(CarNode))。 QueueNode *q。 int count=1。 } return 1。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì) .停車場(chǎng)管理系統(tǒng) 第 29 頁 共 97 頁 if(q==Waitrear) Waitrear=Waitfront。t)。 scanf(%d:%d,amp。 printf( car
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1