立體化停車(chē)場(chǎng)設(shè)計(jì)書(shū)

上傳人:E**** 文檔編號(hào):44751619 上傳時(shí)間:2021-12-05 格式:DOC 頁(yè)數(shù):56 大?。?,003.50KB
收藏 版權(quán)申訴 舉報(bào) 下載
立體化停車(chē)場(chǎng)設(shè)計(jì)書(shū)_第1頁(yè)
第1頁(yè) / 共56頁(yè)
立體化停車(chē)場(chǎng)設(shè)計(jì)書(shū)_第2頁(yè)
第2頁(yè) / 共56頁(yè)
立體化停車(chē)場(chǎng)設(shè)計(jì)書(shū)_第3頁(yè)
第3頁(yè) / 共56頁(yè)

下載文檔到電腦,查找使用更方便

118 積分

下載資源

還剩頁(yè)未讀,繼續(xù)閱讀

資源描述:

《立體化停車(chē)場(chǎng)設(shè)計(jì)書(shū)》由會(huì)員分享,可在線(xiàn)閱讀,更多相關(guān)《立體化停車(chē)場(chǎng)設(shè)計(jì)書(shū)(56頁(yè)珍藏版)》請(qǐng)?jiān)谘b配圖網(wǎng)上搜索。

1、立體化停車(chē)場(chǎng)設(shè)計(jì)書(shū)1.1課題任務(wù)設(shè)停車(chē)場(chǎng)有地下和地面兩層, 統(tǒng)一管理。 地下停車(chē)場(chǎng)采用單入口和單出口。 地上停車(chē)場(chǎng)采用南北方向的雙口,每個(gè)口都有一個(gè)入口和出口。停車(chē)順序先地面,后地下。地面入口處各有一個(gè)單車(chē)道的等候通道, 并允許等候的車(chē)輛因急事從等候通道直接開(kāi)走。 具體的設(shè)計(jì)任務(wù)如下:( 1)采用棧、隊(duì)列和有序表等數(shù)據(jù)結(jié)構(gòu)。( 2)等候車(chē)輛的管理。( 3)地下、地上停車(chē)位的管理。( 4)停車(chē)計(jì)費(fèi)功能 。1.2課題原理針對(duì)本次課程設(shè)計(jì)的具體要求, 我們?cè)O(shè)計(jì)了如下方案: 停車(chē)場(chǎng)部選擇棧作為基本數(shù)據(jù)結(jié)構(gòu),充分利用棧后進(jìn)先出的數(shù)據(jù)結(jié)構(gòu)特點(diǎn),停車(chē)場(chǎng)外部的等候區(qū)域,針對(duì)其“先到先出”的工作特點(diǎn),選擇隊(duì)列作

2、為基本數(shù)據(jù)結(jié)構(gòu)。同時(shí)設(shè)計(jì)了計(jì)時(shí)計(jì)費(fèi)功能,會(huì)員制度,針對(duì)不同型號(hào),是否為會(huì)員的車(chē)輛進(jìn)行分類(lèi)收費(fèi)。2 需求分析2.1課題調(diào)研為了完成本次課程設(shè)計(jì)任務(wù), 我們對(duì)校園周邊的停車(chē)場(chǎng)運(yùn)作狀況進(jìn)行了一系列的前期調(diào)研,包括停車(chē)場(chǎng)的管理系統(tǒng)的運(yùn)行原理, 收費(fèi)標(biāo)準(zhǔn)等等, 為本次課程設(shè)計(jì)任務(wù)的完成打下了良好的基礎(chǔ)。2.2功能需求此次設(shè)計(jì)任務(wù),要求停車(chē)場(chǎng)分為上下兩層,上層為南北雙向入口和出口,下層為單向入口出口,并要求我們?cè)O(shè)計(jì)等待區(qū)域。對(duì)于收費(fèi)標(biāo)準(zhǔn),我們將不同型號(hào)的車(chē)分類(lèi)收費(fèi),同時(shí)增加會(huì)員管理制度,對(duì)于多次在本停車(chē)場(chǎng)停車(chē)的會(huì)員給予優(yōu)惠。3 方案設(shè)計(jì)3.1總體功能設(shè)計(jì)本次課程設(shè)計(jì)共分為四個(gè)主要功能:( 1)進(jìn)入停車(chē)場(chǎng)(

3、 2)離開(kāi)停車(chē)場(chǎng)( 3)查看停車(chē)場(chǎng)現(xiàn)狀( 4)計(jì)費(fèi)功能針對(duì)進(jìn)入停車(chē)場(chǎng)的功能,我們?cè)O(shè)計(jì)了“先地上,后地下” ,的停放順序,當(dāng)?shù)厣夏媳彪p向任一停車(chē)場(chǎng)停滿(mǎn)后,再向該停車(chē)場(chǎng)進(jìn)車(chē),會(huì)顯示“停車(chē)場(chǎng)已滿(mǎn)”等提示信息,并將車(chē)輛停入有剩余車(chē)位的其他停車(chē)場(chǎng)。 當(dāng)所有停車(chē)場(chǎng)均無(wú)停車(chē)位時(shí), 到來(lái)車(chē)輛將會(huì)進(jìn)入等待區(qū)域, 一旦有車(chē)輛離開(kāi)停車(chē)場(chǎng),最先到達(dá)等待的區(qū)域的車(chē)輛將會(huì)進(jìn)入停車(chē)場(chǎng)。針對(duì)離開(kāi)停車(chē)場(chǎng)的功能,可選擇任一停車(chē)場(chǎng)出車(chē),并會(huì)根據(jù)停車(chē)時(shí)長(zhǎng),車(chē)輛類(lèi)型,以及是否為會(huì)員等信息給出本次停車(chē)的費(fèi)用。針對(duì)查看停車(chē)場(chǎng)現(xiàn)狀的功能,將顯示車(chē)牌號(hào),何處停車(chē)等相關(guān)信息。此外,我們還設(shè)計(jì)了計(jì)費(fèi)功能, 利用 windows 系統(tǒng)自帶函數(shù)獲取時(shí)

4、間, 免去了人工手動(dòng)輸入時(shí)間的繁瑣步驟, 同時(shí),針對(duì)不同車(chē)型, 是否享受會(huì)員優(yōu)惠等差異制定了不同的收費(fèi)標(biāo)準(zhǔn),使停車(chē)場(chǎng)的運(yùn)行更為規(guī)化,合理化。3.2數(shù)據(jù)結(jié)構(gòu)設(shè)計(jì)本次課程設(shè)計(jì)主要使用了棧和隊(duì)列兩種數(shù)據(jù)結(jié)構(gòu), 具體的設(shè)計(jì)方案和操作過(guò)程將在個(gè)人報(bào)告中給出,在此不再贅述。3.3函數(shù)原型設(shè)計(jì)int main()system(color E1);coutendl;coutendl;cout endl;cout ” endl; coutendl;coutendl;coutendl;coutendl;coutendl;Car w;int t = 1;s1.sInitStack();s2.sInitStack()

5、;temt1.sInitStack();s3.InitStack(&s3);temp1.InitStack(&temp1);shortcut.InitQueue();while (t)cout= endl;cout*1. 進(jìn)入停車(chē)場(chǎng)*endl;cout* 2. 離開(kāi)停車(chē)場(chǎng)*endl;cout*3. 查看停車(chē)場(chǎng)現(xiàn)狀*endl;cout* 0. 退 出*endl;cout=endl;coutendl;coutt;switch (t)case 1: CarIn(&s3,&s1,&s2, &shortcut); break;case 2: CarOut(&s3,&temp1,&s1,&s2,&temt

6、1 ,&shortcut); break;case 3: LookNow(&s3, &temp1, &s1, &s2, &temt1, &shortcut,&w); break;case 0: break;return 0;3.4用戶(hù)界面設(shè)計(jì)運(yùn)行時(shí)為DOS界面,通過(guò)增加字符畫(huà),更換背景顏色等方法增加界面的美觀度。4 方案實(shí)現(xiàn)4.1開(kāi)發(fā)環(huán)境與工具開(kāi)發(fā)環(huán)境: VisualC+6.04.2個(gè)人設(shè)計(jì)實(shí)現(xiàn)(按組員分小節(jié))奕設(shè)計(jì)實(shí)現(xiàn)隊(duì)列類(lèi)的實(shí)現(xiàn):typedef struct QueueNode/隊(duì)列結(jié)構(gòu)Car data;struct QueueNode *next;QueueNode;class Queu

7、e/定義隊(duì)列類(lèi)public:QueueNode *front, *rear;Queue()cout構(gòu)造函數(shù) endl;Queue();int InitQueue();int DestroyQueue(Queue *Q);int EnterQueue(Queue *Q, Car c);int EmptyQueue(Queue*Q);int DeleteQueue(Queue *Q,Car *c);int QueueLength(Queue *Q);Queue:Queue()cout析構(gòu)函數(shù) endl;int Queue:EmptyQueue(Queue *Q)if (front=rear)cou

8、t 隊(duì)列為空 endl;return (TRUE);elsecout 隊(duì)列不為空 next = NULL;cout 構(gòu)造了一個(gè)空隊(duì)列next;free(front);front=rear;cout 銷(xiāo)毀隊(duì)列成功next = (QueueNode *)malloc(sizeof(QueueNode);if (rear-next = NULL)cout車(chē)輛入隊(duì)失敗 next;rear-data = c;/rear-data.licence= rear-data.leaved;cout車(chē)輛入隊(duì)成功 countnext = NULL;count+;return (TRUE);int Queue:Del

9、eteQueue(Queue *Q,Car *c)/ 刪除隊(duì)列元素QueueNode *t;if (EmptyQueue( Q)cout 要查找車(chē)輛不存在!next;if (rear = t)rear = front;(*c)= t-data;front-next = t-next;free(t);cout 車(chē)輛刪除成功endl;count-;return (TRUE);int Queue:QueueLength(Queue *Q)if (front!=rear)cout 此時(shí)隊(duì)列長(zhǎng)隊(duì)為count-1endl;return 1;else return 0;王卓君設(shè)計(jì)實(shí)現(xiàn)Time 類(lèi):#incl

10、ude #include #include #include#include #include #include using namespace std;class Time/時(shí)間類(lèi)private:SYSTEMTIME LocalTime;int month;int day;int hour;int minuet;int second;public:Time()GetLocalTime(&LocalTime);/取系統(tǒng)時(shí)間void OutputTime();/輸出時(shí)間函數(shù)int getmonth() return LocalTime.wMonth;int getday() return Loc

11、alTime.wDay;int gethour() return LocalTime.wHour;int getminute() return LocalTime.wMinute;int getsecond() return LocalTime.wSecond;void save()month=getmonth();day=getday();hour=gethour();minuet=getminute();second=getsecond();Time();void Time:OutputTime()/輸出當(dāng)前系統(tǒng)時(shí)間cout 當(dāng) 前 時(shí) 間 為 : getmonth()月 getday()

12、getminute()分 getsecond()秒 endl;日gethour()時(shí)/ 主函數(shù)void main()Time t;t.OutputTime();cout現(xiàn) 在 是t.getminute()t.getmonth()分 t.getsecond()月t.getday()秒 endl;日t.gethour()時(shí)Guest 類(lèi):#include #include #include #include#include #include #include static int carfre100=0;/static int carid=0;using namespace std;class T

13、ime/時(shí)間類(lèi)private:SYSTEMTIME LocalTime;int month;int day;int hour;int minuet;int second;public:Time()GetLocalTime(&LocalTime);/取系統(tǒng)時(shí)間void OutputTime();/輸出時(shí)間函數(shù)int getmonth() return LocalTime.wMonth;int getday() return LocalTime.wDay;int gethour() return LocalTime.wHour;int getminute() return LocalTime.wM

14、inute;int getsecond() return LocalTime.wSecond;void save()month=getmonth();day=getday();hour=gethour();minuet=getminute();second=getsecond();Time();void Time:OutputTime()/輸出當(dāng)前系統(tǒng)時(shí)間cout 當(dāng) 前 時(shí) 間 為 : getmonth()getminute()分 endl;月 getday()日gethour()時(shí)#define MAXSIZE 100 typedef struct /鏈表的最大長(zhǎng)度線(xiàn)性表的靜態(tài)單鏈表的存儲(chǔ)

15、結(jié)構(gòu)/char data10;int data;int cur;component,SLinkListMAXSIZE;typedef struct Carint leaved;char licenceLICENCESIZE;Time arrive;Time leave;Car;class Guest:public Time/客戶(hù)類(lèi),繼承Time 類(lèi)public:Time t1,t2;SLinkList carid;/該數(shù)組存車(chē)牌號(hào)/char e10;int e;int j,k,v;int cartype;/車(chē)輛類(lèi)型:1 客車(chē)2貨車(chē)3轎車(chē)4 越野車(chē)5 跑車(chē)float price;public:G

16、uest()for(int i=1,m=0;i=100,m100;i+,m+)caridm.cur=i;/caridi.data = 0000000;/j=0;Guest()intLocateElem(SLinkListcarid,int*e);/線(xiàn)性表定位函數(shù),查找值為e 的元素void saveid(Car *c,int v); float fee(Time t1,Time t2);/該函數(shù)儲(chǔ)存會(huì)員的車(chē)牌號(hào)和停車(chē)次數(shù)計(jì)算價(jià)格函float cutprice(float price,int v);/計(jì)算打折價(jià)格函數(shù);int Guest:LocateElem(SLinkList carid,in

17、t *e)/在靜態(tài)單鏈線(xiàn)性表中查找第個(gè)值為 i 的元素若找到,則返回它在表中的位序,否則返回下一1位k=0;/while(k&strcmp(caridk.data,e)!=0)/在表中順鏈查找while(caridk.data != *e)k=caridk.cur;if(!caridk.data)j=k;k=0;return j+1;return k+1;/LocateElemfloat Guest:fee(Time t1,Time t2)/計(jì)算普通價(jià)格if(t1.getmonth()!=t2.getmonth()price=(t2.getmonth()-t1.getmonth()*3000;

18、else if(t1.getday()!=t2.getday()price=(t2.getday()-t1.getday()*500;elseprice=(t2.gethour()-t1.gethour()*3600+(t2.getsecond()-t1.getsecond()*60+ (t2.getsecond()-t1.getsecond()*CHARGE;cout 您的車(chē)是什么類(lèi)型? 1 客車(chē) 2 貨車(chē) 3 轎車(chē) 4 越野車(chē) 5 跑車(chē) cartype;switch(cartype)/1case 1:case 2:price=price*2;break;case 3:price=price

19、;break;case 4:price=price*1.5;break;case 5:price=price*1.2;break;客車(chē)2貨車(chē)3轎車(chē)4 越野車(chē)5 跑車(chē)return price;float Guest:cutprice(float price,int v)/計(jì)算會(huì)員打折后的價(jià)格/int i = LocateElem(carid,*e);/調(diào)用線(xiàn)性表定位函數(shù)if(carfrev-1=100)price=price*0.55;else if(carfrev-1=50)price=price*0.7;else if(carfrev-1=20)price=price*0.85;elsepr

20、ice=price*0.95;return price;/LocateElem函數(shù)的測(cè)試函數(shù)void main()Guest guest;int e;SLinkList carid;for(int n=0,x=1111;n5,x=5555;n+,x=x+1111)caridn.data=x;for(int i=1,m=0;i=100,m100;i+,m+)caridm.cur=i;for(int y=5;y100;y+)caridy.data=0;coute;cout 結(jié)果是存在第guest.LocateElem(carid,&e)位endl;小玉設(shè)計(jì)實(shí)現(xiàn)voidCarOut1(SqStack

21、*parking1,SqStack*parking2,SqStack*temt,Queue *shortcutt)int a;char licenceLICENCESIZE;Car c;Time t2;t2.save();Guest guest;t2.OutputTime();cout 請(qǐng)輸入車(chē)牌號(hào):;gets(licence);printf(南停車(chē)場(chǎng)出車(chē)請(qǐng)輸入0,北停車(chē)場(chǎng)出車(chē)請(qǐng)輸入1.n);scanf(%d%*c, &a);if(!(a=1)int i = 0;s1.sPop(&s1, &c);while (strcmp(c.licence, licence) != 0 & s1.top!=

22、0)temt1.sPush(&temt1, c);s1.sPop(&s1, &c);i+;c.leave=t2;int x;float price;coutx;if(x=1)price=guest.fee(c.arrive,c.leave);price=guest.cutprice();elseprice=guest.fee(guest.t1,guest.t2);cout 該車(chē)應(yīng)付 fabs(price) 元endl; while (!s1.sEmpty(&s1)temt1.sPop(&temt1, &c);s1.sPush(&s1, c);if (!shortcut.EmptyQueue(

23、&shortcut)shortcut.DeleteQueue(&shortcut,& c);s1.sPush(&s1, c);c.leave=t2;printf(n);elses2.sPop(&s2,&c);while (strcmp(c.licence, licence) != 0)temt1.sPush(&temt1, c);s2.sPop(&s2, &c);c.leave=t2;int x;float price;coutx;if(x=1)price=guest.fee(c.arrive,c.leave);price=guest.cutprice();elseprice=guest.fe

24、e(guest.t1,guest.t2);cout 該車(chē)應(yīng)付 fabs(price) 元endl; while (!temt1.sEmpty(&temt1)temt1.sPop(&temt1, &c);s2.sPush(&s2, c);if (!shortcut.EmptyQueue(&shortcut)shortcut.DeleteQueue(&shortcut,& c);s2.sPush(&s2, c);printf(n);void CarOut2(Stack *park, Stack *temp,Queue *Q)char licenceLICENCESIZE;Car c;Time t2

25、;t2.save();Guest guest;t2.OutputTime();cout 請(qǐng)輸入車(chē)牌號(hào):;gets(licence);s3.Pop(&s3, &c);while (strcmp(c.licence, licence) != 0)temp1.Push(&temp1, c);s3.Pop(&s3, &c);c.leave=t2;int x;float price;coutx;if(x=1)price=guest.fee(c.arrive,c.leave);price=guest.cutprice();elseprice=guest.fee(guest.t1,guest.t2);cou

26、t 該車(chē)應(yīng)付 fabs(price) 元 endl; while (!s3.EmptyStack(&temp1)temp1.Pop(&temp1, &c);s3.Push(&s3, c);if (!shortcut.EmptyQueue( Q)shortcut.DeleteQueue(&shortcut, &c);s3.Push(&s3, c);printf(n);void CarOut(Stack *park, Stack *temp,SqStack *parking1,SqStack *parking2,SqStack *temt ,Queue *shortcut)int P;cout 地

27、上停車(chē)場(chǎng)出車(chē)請(qǐng)輸入 1,地下停車(chē)場(chǎng)出車(chē)請(qǐng)輸入 2 ; scanf(%d%*c, &P);switch(P)case 1:CarOut1(parking1, parking2,temt, shortcut );break;case 2:CarOut2(park, temp, shortcut);break;天舒設(shè)計(jì)實(shí)現(xiàn)typedef struct Carint licence;Car;class SqStackpublic:Car dataSTACKSIZE;int top;int base;SqStack();void InitSqStack(SqStack *s);int EmptySqSt

28、ack(SqStack *s);int FullSqStack(SqStack *S);int SGetTop(SqStack *s,Car c);int SPush(SqStack *s,Car c);int SPop(SqStack *s,Car *c);SqStack:SqStack()/析構(gòu)函數(shù)int SqStack:EmptySqStack(SqStack *s)if (base=top)cout 地上停車(chē)場(chǎng)現(xiàn)無(wú)車(chē),棧為空!endl;return (TRUE);elsecout 地上停車(chē)場(chǎng)現(xiàn)有車(chē),棧不為空!endl;return (FALSE);int SqStack:FullSqS

29、tack(SqStack *S)if (top = STACKSIZE - 1)cout 地上停車(chē)場(chǎng)車(chē)輛已滿(mǎn),棧滿(mǎn)!endl;return (TRUE);elsecout 地上停車(chē)場(chǎng)還有空位,棧未滿(mǎn)!endl;return (FALSE);int SqStack:SPush(SqStack *S, Car c)if (FullSqStack(S)return (FALSE);elsetop+;datatop = c;cout 車(chē)輛已入棧,成功停入地上停車(chē)場(chǎng) !endl; return (TRUE);int SqStack:SPop(SqStack *S, Car *c)if (EmptySqS

30、tack(S)return (FALSE);else(*c) = datatop;top-;cout 車(chē)輛已出棧,離開(kāi)地上停車(chē)場(chǎng),歡迎下次光臨!endl;return (TRUE);int SqStack:SGetTop(SqStack *s,Car c)if(top=base)return FALSE;elsec=datatop-1;top-;return (TRUE);/若棧非空,則返回s 的棧頂元素;否則返回ERRORvoid SqStack:InitSqStack(SqStack *s)top=0;base=0;cout 現(xiàn)構(gòu)造一個(gè)空棧!endl;/置棧一個(gè)空棧Sclass Stack

31、public:Car dataSTACKSIZE;int top;int base;Stack();void InitStack(Stack *s);int EmptyStack(Stack *s);int FullStack(Stack *S);int GetTop(Stack *s,Car c);int Push(Stack *s,Car c);int Pop(Stack *s,Car *c);Stack:Stack()cout 現(xiàn)已構(gòu)造一個(gè)棧類(lèi)endl;/析構(gòu)函數(shù)int Stack:EmptyStack(Stack *S)if (base=top)cout 地下停車(chē)場(chǎng)現(xiàn)無(wú)車(chē),棧為空!en

32、dl;return (TRUE);elsecout 地下停車(chē)場(chǎng)現(xiàn)有車(chē),棧不為空!endl;return (FALSE);int Stack:FullStack(Stack *S)if (top = STACKSIZE - 1)cout 地下停車(chē)場(chǎng)車(chē)輛已滿(mǎn),棧滿(mǎn)!endl;return (TRUE);elsecout 地下停車(chē)場(chǎng)還有空位,棧未滿(mǎn)!endl;return (FALSE);int Stack:Push(Stack *S, Car c)if (FullStack(S)return (FALSE);elsetop+;datatop = c;cout 車(chē)輛已入棧,成功停入地下停車(chē)場(chǎng) !en

33、dl; return (TRUE);int Stack:Pop(Stack *S, Car *c)if (EmptyStack(S)return (FALSE);else(*c) = datatop;top-;cout 車(chē)輛已出棧,離開(kāi)地下停車(chē)場(chǎng),歡迎下次光臨!endl;return (TRUE);int Stack:GetTop(Stack *s,Car c)if(top=base)return FALSE;elsec=datatop-1;top-;return (TRUE);/若棧非空,則返回s 的棧頂元素;否則返回ERRORvoid Stack:InitStack(Stack *s)to

34、p=0;base=0;cout 現(xiàn)構(gòu)造一個(gè)空棧!endl;/置棧一個(gè)空棧S嘉文設(shè)計(jì)實(shí)現(xiàn)void CarIn(Stack *park, SqStack *parking1,SqStack *parking2,Queue *shortcuttt)int q=1;Car c;Time t1;Guest guest;t1.OutputTime();t1.save();c.arrive=t1;coutendl;guest.saveid(&c);if(s3.FullStack(&s3)=1)&(s1.sFullStack(&s1)=1)&(s2.sFullStack(&s2)=1)cout 停車(chē)場(chǎng)已滿(mǎn),新

35、來(lái)的車(chē)在過(guò)道等待 !endl; shortcut.EnterQueue( &shortcut, c);elseif(s1.sFullStack(&s1)=1)&(s2.sFullStack(&s2)=1)cout地上停車(chē)場(chǎng)已滿(mǎn),請(qǐng)停入地下停車(chē)場(chǎng)endl;cout 車(chē)已在停車(chē)場(chǎng)停車(chē),現(xiàn)在開(kāi)始計(jì)時(shí)coutendl;s3.Push(&s3, c);system(pause);elseif(s1.sFullStack(&s1)=0)&(s2.sFullStack(&s2)=0)cout 南北停車(chē)場(chǎng)均有車(chē)位coutendl;endl;cout請(qǐng)選擇車(chē)輛進(jìn)口編號(hào),南:1,北:2endl;cout 請(qǐng)輸入入

36、口方向:;scanf(%d%*c, &q);switch(q)case 1:s1.sPush(&s1,c);break;case 2:s2.sPush(&s2, c);break;else if(s1.sFullStack(& s1)=0)&(s2.sFullStack(& s2)=1)cout 北入口已滿(mǎn),車(chē)輛進(jìn)入南入口endl;s1.sPush(&s1,c);system(pause);else if(s1.sFullStack(parking1)=1)&(s2.sFullStack(parking2)=0)cout南入口已滿(mǎn),車(chē)輛進(jìn)入北入口endl;s2.sPush(&s2, c);sy

37、stem(pause);cout車(chē)已在停車(chē)場(chǎng)停車(chē),現(xiàn)在開(kāi)始計(jì)時(shí)!endl;cout 請(qǐng)按任意鍵繼續(xù)操作 ! ; getchar();system(cls);system(color b0);printf(n);voidLookNow(Stack *park,Stack *temp,SqStack*parking1,SqStack*parking2,SqStack*temt,Queue *shortcut,Car *c)QueueNode *p;while (!s1.sEmpty(&s1)s1.sPop(&s1,c);temt1.sPush(&temt1,* c);while (!temt1.s

38、Empty(&temt1)temt1.sPop(&temt1, c);cout車(chē)輛停車(chē)信息licence:地上南停車(chē)場(chǎng)停車(chē) endl;s1.sPush(&s1,* c);while (!s2.sEmpty(&s2)s2.sPop(&temt1, c);temt1.sPush(&temt1, *c);while (!temt1.sEmpty(&temt1)temt1.sPop(&temt1, c);cout車(chē)輛停車(chē)信息licence:地上北停車(chē)場(chǎng)停車(chē) endl;s2.sPush(&s2, *c);while (!s3.EmptyStack(&s3)s3.Pop(&s3, c);temp1.Pus

39、h(&temp1, *c);while (!temp1.EmptyStack(&temp1)temp1.Pop(&temp1, c);cout車(chē)輛停車(chē)信息licence:地下停車(chē)場(chǎng)停車(chē) front-next;while (p != NULL)cout 車(chē) 輛 停 車(chē) 信 息licence: 排 隊(duì) 等 待中 .next;printf(n);int main()system(color E1);coutendl;cout endl;cout endl;cout endl; coutendl;coutend l;coutendl;coutendl;coutendl;Car w;int t = 1;

40、s1.sInitStack();s2.sInitStack();temt1.sInitStack();s3.InitStack(&s3);temp1.InitStack(&temp1);shortcut.InitQueue();while (t)cout= endl;cout* 1.進(jìn)入停車(chē)場(chǎng)*endl;coutcout* 2. 離開(kāi)停車(chē)場(chǎng) * 3.查看停車(chē)場(chǎng)現(xiàn)狀endl;*endl;cout* 0.退 出*endl;cout=endl;coutendl;coutt;switch (t)case 1: CarIn(&s3,&s1,&s2, &shortcut); break;case 2: C

41、arOut(&s3,&temp1,&s1,&s2,&temt1 ,&shortcut); break;case 3: LookNow(&s3, &temp1, &s1, &s2, &temt1, &shortcut,&w); break;case 0: break;return 0;5 測(cè)試與調(diào)試5.1個(gè)人測(cè)試(按組員分小節(jié))奕測(cè)試#include #include #include #include#include #include #include #include #define STACKSIZE 3 / #define LICENCESIZE 10/ static int count=1;設(shè)置地下停車(chē)場(chǎng)容量設(shè)置車(chē)牌號(hào)#define TRUE 1#define FALSE 0using namespace std;typedef struct Carint leaved;char licenceLICENCESIZE;Car;typedef struct QueueNode/隊(duì)列結(jié)構(gòu)

展開(kāi)閱讀全文
溫馨提示:
1: 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

相關(guān)資源

更多
正為您匹配相似的精品文檔
關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話(huà):18123376007

備案號(hào):ICP2024067431號(hào)-1 川公網(wǎng)安備51140202000466號(hào)


本站為文檔C2C交易模式,即用戶(hù)上傳的文檔直接被用戶(hù)下載,本站只是中間服務(wù)平臺(tái),本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng),我們立即給予刪除!