停车场Word格式文档下载.docx

上传人:b****3 文档编号:7798424 上传时间:2023-05-09 格式:DOCX 页数:8 大小:16.02KB
下载 相关 举报
停车场Word格式文档下载.docx_第1页
第1页 / 共8页
停车场Word格式文档下载.docx_第2页
第2页 / 共8页
停车场Word格式文档下载.docx_第3页
第3页 / 共8页
停车场Word格式文档下载.docx_第4页
第4页 / 共8页
停车场Word格式文档下载.docx_第5页
第5页 / 共8页
停车场Word格式文档下载.docx_第6页
第6页 / 共8页
停车场Word格式文档下载.docx_第7页
第7页 / 共8页
停车场Word格式文档下载.docx_第8页
第8页 / 共8页
亲,该文档总共8页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

停车场Word格式文档下载.docx

《停车场Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《停车场Word格式文档下载.docx(8页珍藏版)》请在冰点文库上搜索。

停车场Word格式文档下载.docx

⑶程序所能达到的功能

实现停车场的管理,输入车牌号码,将此车停入停车站,并展示出来,在另一个编辑框中输入车牌号,将此车开出停车站。

若停车站已满,则在便道中展示出来。

(4)测试数据:

停车牌号:

123车库:

123便道:

(空)

12341234

出车牌号:

1234车库:

(空)出车情况:

1234

三、程序流程图略

四、数据结构及算法描述

数据结构

ypedefstructparting

{

CStringchepai;

clock_tstart;

}PART;

typedefstructwaiting

clock_tstart,finish;

structwaiting*next;

}WAIT;

typedefstruct

WAIT*front,*rear;

}Lwait;

算法描述

BOOLCpart:

:

add(CStringchepai)

BOOLflg=true;

if(i>

=N)flg=false;

else

{

parting[i].chepai=chepai;

parting[i].start=clock();

i++;

}

returnflg;

}

voidCpart:

display(CListBox*list)

CStringstr,xs;

list->

ResetContent();

InsertString(0,"

车位车牌号"

);

for(intm=0;

m<

i;

m++)

{

str="

"

;

xs.Format("

%-3d"

m);

str+=xs+"

"

xs=parting[m].chepai;

str+=xs;

InsertString(m+1,str);

adding(CStringchepai)

if(q->

front->

next==NULL)

{

WAIT*p=newWAIT;

p->

next=NULL;

q->

front=q->

rear=p;

p=newWAIT;

chepai=chepai;

rear->

next=p;

disp(CListBox*list)

车牌号"

intm=0;

for(WAIT*p=q->

next;

p;

p=p->

next)

str="

xs.Format("

%s"

p->

chepai);

str+=xs;

InsertString(++m,str);

//DELvoidCpart:

del(intn)

//DEL{

//DEL

//DEL}

//DELWAIT*Cpart:

head()

pop()

{

parting[i].chepai=head->

next->

chepai;

parting[i].start=head->

start;

i++;

WAIT*p;

p=head->

head->

next=p->

deletep;

push()

i--;

chepai=parting[i].chepai;

start=parting[i].start;

next=head->

 

out()

parting[i].chepai=q->

parting[i].start=clock();

WAIT*m=q->

next=m->

deletem;

push2()

WAIT*m;

m=newWAIT;

m->

finish=clock();

p2->

next=m;

p2=m;

disp2(CListBox*list)

车牌号停车时间停车收费"

for(WAIT*mm=head2->

mm;

mm=mm->

%-s"

mm->

%6ds"

((mm->

finish-mm->

start)/1000));

str+="

+xs;

%6.2f元"

start)/1000)*0.003);

str+="

五、调试分析

⑴出站函数难以实现,通过老师的帮助得以解决。

⑵算法时间复杂度:

O(n).

⑶改进思想:

导入图片,便于直观理解。

⑷经验体会:

平时要多读程序,注意和老师同学交流。

六、使用说明

在“停车牌号”处连续输入车牌号,单击“停车”按钮,可使此车挺入停车站,若停车站已满则停入便道。

在“出车牌号”处输入车牌号,单击“出车”按钮,当没有此车时,可见提示框“没有此车”,若有此车,可见“停车站”“便道”和“停车情况”列表框实现相应变化

七、测试结果

停车牌号:

12341234

出车牌号:

12

1234512345

12

12345s0.01元

12345

12

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 商务科技

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2