




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、 HYPERLINK 目錄系統(tǒng)開發(fā)的的必要性及及介紹系統(tǒng)概要設(shè)設(shè)計系統(tǒng)詳細設(shè)設(shè)計系統(tǒng)源代碼碼調(diào)試分析和和測試結(jié)果果系統(tǒng)使用說說明書心得體會參考文獻課程設(shè)計題題目:倉庫庫貨品信息管理系系統(tǒng)一、系統(tǒng)開開發(fā)的必要要性及介紹1.必要性性倉庫管理是是現(xiàn)代物流流管理的一一個重要組組成部分,倉倉庫貨物管管理信息系系統(tǒng)的設(shè)計計,可以實現(xiàn)現(xiàn)對存儲貨貨物信息及及統(tǒng)計單據(jù)據(jù)的計算機機管理,簡簡化作業(yè)程程序,提高高作業(yè)效率率,為企業(yè)業(yè)創(chuàng)造更高高的利潤。2.主要功功能介紹本系統(tǒng)有對對庫存貨品品信息的輸輸入、插入入、刪除、查找等功功能,并能能將建立和和更新的庫庫存信息保保存于文件件供輸出或或打印。對對于查找、刪除等功功能
2、要求能能按貨品名名、貨品號號分別進行行。每個貨貨品的相關(guān)關(guān)信息包括括:貨品號號、貨品名名、貨品庫庫存量、進進貨日期、貨品生產(chǎn)產(chǎn)廠家及供供應(yīng)商等。二、系統(tǒng)概概要設(shè)計1.系統(tǒng)設(shè)設(shè)計任務(wù)要求系統(tǒng)能能實現(xiàn)庫存存貨品信息息的輸入、插入、刪刪除、查找找等功能,并并能將建立和更更新的庫存存信息保存存于文件供供輸出或打打印。對于于查找、刪刪除等功能能能夠按貨貨品名、貨貨品號分別別進行。每每個貨品的的相關(guān)信息息包括:貨貨品號、貨貨品名、貨貨品庫存量量、進貨日日期、貨品品生產(chǎn)廠家家及供應(yīng)商商等。2.方案確確定庫存貨品信信息管理系系統(tǒng)要求實實現(xiàn)許多功功能,可遵遵循結(jié)構(gòu)化化程序設(shè)計計思想來進進行本系統(tǒng)統(tǒng)的設(shè)計自頂向向
3、下,逐步步細化,也也就是將軟軟件設(shè)計任任務(wù)劃分成成許多容易易解決的小小的子任務(wù)務(wù),即分解解出許多子子功能模塊塊進行設(shè)計計。本程序序經(jīng)過分析析可劃分出出6個子任任務(wù):輸入入、輸出、插入、刪刪除、查找找和保存。3.模塊劃劃分 (1)程程序設(shè)計模模塊連接圖圖庫存貨品信信息管理系系統(tǒng)的模塊塊連接結(jié)構(gòu)構(gòu)如下圖:倉庫貨品信息管理系統(tǒng) 主程序模塊 載入模塊保存模塊 查找模塊刪除模塊插入模塊 輸出模塊輸入模塊4.環(huán)境要要求硬件:PCC機軟件:電腦腦安裝有TTC集成環(huán)環(huán)境三、系統(tǒng)詳詳細設(shè)計1數(shù)據(jù)結(jié)結(jié)構(gòu)設(shè)計(1)數(shù)據(jù)據(jù)結(jié)構(gòu)的選選擇選取動態(tài)數(shù)數(shù)據(jù)結(jié)構(gòu),本本系統(tǒng)是通通過雙向鏈表來來完成的。動態(tài)存儲分分配與釋放放:申請
4、存儲空空間函數(shù)mmallooc( )函數(shù)首部原原型為void * maallocc(unssigneed innt siize)釋放存儲空空間函數(shù)ffree( )函數(shù)首部原原型為void freee(voidd*p)動態(tài)數(shù)據(jù)結(jié)結(jié)構(gòu)雙向鏈表 (2) 數(shù)據(jù)類型型的選擇strucct coommoddity /*定定義雙向鏈鏈表結(jié)構(gòu)體體*/int numbber; /*貨物編編號*/ charr nammemaax; /*貨物名名稱*/ int counnter; /*貨物數(shù)數(shù)量*/ struuct ccommoodityy *piiror, *neext; /*定義兩兩指針,分分別指向其其前驅(qū)和后
5、后繼*/;(3)變量量函數(shù)說明明:COM *inpuut( )操作結(jié)果:輸入貨品品信息COM *inseert_pperf( )操作結(jié)果:插入某貨貨品COM *del_perff( )操作結(jié)果:刪除某貨貨品serchh( )操作結(jié)果:查找某貨貨品printt_perrf( )操作結(jié)果:輸出某貨貨品save(COM*headd)操作結(jié)果:保存COM *opennfilee( )操作結(jié)果:載入2.流程框框圖查找模塊和和載入模塊塊的算法框框圖在此略略。開始(1)輸入入模塊申請一個結(jié)點空間,使ptr1指向它將ptr1指向結(jié)點輸入貨品的信息ptr1-num!=0 NNULL=ptr1Y ptr1!=NU
6、LL N是否為第一個數(shù)據(jù)(n=0) Y NPtr1=ptr2-next;ptr2=ptr1-prior Yptr1=head Yn+1=n, ptr1=ptr2NULL=ptr2-next 返回head結(jié)束(2)插入入模塊 開始調(diào)入載入模塊Head=NULL申請一個結(jié)點空間,使ptr3指向它給ptr3指向結(jié)點輸入預(yù)插入貨品的信息 Head=ptr1ptr1!=NULL N Y返回NULLptr1=ptr2;ptr1-next=ptr1ptr2=ptr1-priorptr3=ptr2-next;ptr2=ptr3-priorNULL=ptr3-next“yes”or “no” NY 返回head
7、結(jié)束開始(3)保存存模塊輸入預(yù)保存文件的文件名創(chuàng)建文件成功 N YHead=ptr1Ptr1!=NULL N Y將ptr1指向結(jié)點的數(shù)據(jù)寫入文件Ptr1-next=ptr1結(jié)束開始 2030(4)輸出出模塊 調(diào)用載入模塊Head= =NULL YYHead=ptr1輸出ptr1指向結(jié)點的貨品信息 Ptr1-next=ptr1 NPtr1!=NULL Y N結(jié)束對以上各模模塊的文字字解釋說明明:(1)輸入入模塊:其其實就是一一個建立鏈鏈表的操作作模塊。建建立鏈表的的具體操作作就是逐一一輸入各結(jié)結(jié)點數(shù)據(jù),并并建立其前前后相鏈的的關(guān)系。首首先設(shè)三個個指針變量量:heaad,pttr1,pptr2。它
8、們都是是指向結(jié)構(gòu)構(gòu)體類型數(shù)數(shù)據(jù)的。先先使heaad的值為為NULLL,這是鏈鏈表為空的的情況。用用mallloc函數(shù)數(shù)開辟一個個結(jié)點,并并使ptrr1,pttr2都指指向它,之之后從鍵盤盤讀入一個個貨品的數(shù)數(shù)據(jù)給pttr1所指指向的結(jié)點點。當輸入入的ptrr1-nnum不為為0時,令令headdptrr1;pttr2=pptr1,即即把ptrr1的值賦賦給heaad,使pptr2,ptr11,heaad都指向向這一新開開辟的結(jié)點點,此結(jié)點點就成為鏈鏈表中的第第一個結(jié)點點。再開辟辟一個新結(jié)結(jié)點并使pptr1指指向它,讀讀入該結(jié)點點的數(shù)據(jù),如如果輸入的的ptr11-nuum不為00,則應(yīng)鏈鏈入這第
9、二二個結(jié)點,這這時和上一一個結(jié)點的的處理不同同,是將pptr1的的值賦給pptr2-nexxt,也就就是使第一一個結(jié)點的的nextt成員指向向第二個結(jié)結(jié)點,接著著將ptrr2也指向向結(jié)點2。再開辟一一個新結(jié)點點并使pttr1指向向它,讀入入該結(jié)點的的數(shù)據(jù),同同樣將pttr1的值值賦給pttr2-nextt,也就是是使第三個個結(jié)點鏈接接到第二個個結(jié)點之后后,并接著著將ptrr1的值賦賦給ptrr2,使pptr2指指向結(jié)點33。再開辟辟一個新結(jié)結(jié)點,并使使ptr11指向它,輸輸入該結(jié)點點的數(shù)據(jù),如如果輸入pptr1-numm為0,則則是輸入結(jié)結(jié)束標志,此此結(jié)點不被被鏈接到鏈鏈表中,就就將NULLL
10、賦給pptr2-nexxt。建立立鏈表過程程至此結(jié)束束,ptrr1最后所所指結(jié)點并并未鏈入鏈鏈表中。(2)插入入模塊:要要完成的是是鏈表的插插入操作,即即將一個新新結(jié)點插入入到一個已已有的鏈表表中,對剛剛剛建立的的鏈表,首首先新設(shè)一一個指針變變量ptrr0,并開開辟一個結(jié)結(jié)點使pttr3指向向它,輸入入該結(jié)點的的數(shù)據(jù),即即新貨的有有關(guān)數(shù)據(jù),接接下來查找找要插入位位置結(jié)點,找找到后只需需修改此結(jié)結(jié)點和pttr0指向向結(jié)點指針針域的值即即可,鏈表表中所有元元素位置均均不需移動動,這就體體現(xiàn)了鏈表表的優(yōu)點。(3)刪除除模塊:要要完成的是是鏈表的刪刪除操作,只只需修改鏈鏈表中要刪刪除結(jié)點的的前一個結(jié)結(jié)
11、點的鏈指指針。使之之指向被刪刪除結(jié)點的的后面一個個結(jié)點即可可。(4)保存存模塊:將將最終想要要保留的數(shù)數(shù)據(jù)信息保保存于文件件中。(5)輸出出模塊:要要完成的是是依次輸出出鏈表中各各結(jié)點的數(shù)數(shù)據(jù)的操作作。首先找找到鏈表頭頭結(jié)點的地地址,也就就是heaad的值,然然后設(shè)一個個指針變量量ptr11,先指向向第一個結(jié)結(jié)點,輸出pttr1所指指的結(jié)點,然然后使pttr1后移移一個結(jié)點點,再輸入入直至鏈表表的尾結(jié)點點結(jié)束。四、系統(tǒng)源源代碼#incllude /*標標準輸入/輸出頭文文件*/#incllude /*包包含繪制圖圖形函數(shù)等等頭文件*/#incllude /*包包含字符串串處理函數(shù)數(shù)頭文件*/#
12、incllude /*包包含動態(tài)存存儲與釋放放函數(shù)頭文文件*/#incllude#defiine LLEN ssizeoof(COOM)#defiine PPRINTT % -15lld% -15s% -155dn,ptrr1-nnum,pptr1-namme,pttr1-counnt#defiine CCHECKK_COUUNT pptr1-couuntcoountnuum);fflushhall(); iif(pttr1-num=0) priintf(Pleease presss anny keey too bacck too lasst Meenu:); gettch( ); freee
13、(pttr1); retturn(0); prrintff(Plleasee inpput tthe NNo.%dd gooods%s:nn,n,striing2);scaanf(%s,&ptrr1-nname); fllushaall( ); /*刷刷新緩沖區(qū)區(qū)函數(shù)*/ prrintff(Plleasee inpput tthe NNo.%dd gooods%s:nn,n,striing3);scaanf(%d,&ptrr1-ccountt); fllushaall( ); iff(CHEECK_CCOUNTT) prrintff(Plleasee inpput tthe rrightt g
14、ooodscoount!n); wwhilee(CHEECK_CCOUNTT); whiile(pptr1-numm!=NUULL) iif(n=1) hhead=ptr11; ellse pptr2-nexxt=pttr1; pttr1-prioor=pttr2; n=n+1; pttr2=pptr1; iff(pttr1=(COM* )maallocc(LENN)=NULLL) prrintff(Noo enoough memoory,ffail to ccreatt linnklisst!); getcch( ); doo prinntf(Pleaase iinputt thee No.
15、%d ggoodss%s:n,n,sttringg1); scannf(%ld,&ptrr1-nnum); flusshalll( ); if(pptr1-numm=0) pptr1-numm=NULLL; bbreakk; prinntf(Pleaase iinputt thee No.%d ggoodss%s:n,n,sttringg2);sscanff(%ss,&pptr1-namme); flusshalll( ); prinntf(Pleaase iinputt thee No.%d ggoodss%s:n,n,sttringg3);sscanff(%dd,&pptr1-couunt
16、); flusshalll( ); if(CCHECKK_COUUNT) prinntf(Pleaase iinputt thee rigght ggoodsscounnt!nn); whille(CHHECK_COUNNT); ptrr2-nnext=NULLL; gottoxy(1,244); priintf(Finnish the inpuuttinng off gooodsmmessaage,ppresss anyy keyy to backk to lastt Mennu,plleasee savve:); gettch(); retturn(headd);/*插入模模塊*/COM
17、* inssert( ) COMM * pptr3; chaar sttringg1 =ggoodssnumbber; chaar sttringg2 =ggoodssnamee; chaar sttringg3 =ggoodsscounnt; chaar juudge10; clrrscr( ); gottoxy(18,110); priintf(Pleease inpuut innsertted ggoodssfliienamme:); heaad=oppenfiile( ); if(headd=NUULL) retturn(NULLL); elsse ddo clrrscr( ); pr
18、iintf(Pleease inpuut innsertted ggoodssgooodsmeessagge:nn); if(ptrr3=(CCOM*)mallloc(LLEN)=NUULL) prrintff(Noo enoough memoory,ffail to ccreatt nodde!); geetch(); ddo prinntf(Pleaase iinputt gooods%s(00):nn,sttringg1);sscanff(%lld,&ptr33-nuum); flusshalll( ); if(pptr3-nummnamee);fllushaall( ); pprint
19、tf(PPleasse innput goodds%ss:n,strring33);sccanf(%d,&(pptr3-couunt); fllushaall( ); iif(CHHECK_COUNNT2) pprinttf(PPleasse innput the righht gooodsccountt(0)!n); wwhilee(CHEECK_CCOUNTT2); pptr1=headd; wwhilee(ptrr1!=NNULL) ptr22=ptrr1; ptr11=ptrr1-nnext; ptr11-prrior=ptr22; ptr2-nexxt=pttr3;ptr3-prii
20、or=pptr2; pptr3-nexxt=NUULL; pprinttf(nInssertiing ssucceess!CCotinnue tto innsertt?(yees orr no):); sscanff(%ss,juudge); cclrsccr( ); whhile(! sttrcmpp(juddge,yes); gotooxy(220,100); prinntf(Inseertinng suuccesss!nn); gotooxy(118,111); prinntf(Presss anny keey too bacck too lasst Meenunn); gotooxy(
21、116,122); prinntf(And makee surre too Savve(6) theem orr youu willl loose tthem!n); getcch( ); retuurn(hhead);/*刪除模模塊*/COM *deleet( ) chhar nname10; chhar jjudgee10; innt seel; innt deel_nuum; cllrscrr( ); gootoxyy(20,10); prrintff(Plleasee inpput ddeleccted gooddsfllienaame:); heead=oopenffile( );
22、cllrscrr( ); iff(heaad=NNULL) retuurn(NNULL); ellse ddo do cclrsccr( ); ggotoxxy(3,4); pprinttf(PPleasse innput deleectedd gooodsmmessaage:); ggotoxxy(1,9); pprinttf( *1.Deel deependd on gooddsnummbern); ggotoxxy(1,10); pprinttf( *2.Deel deependd on gooddsnammen); ggotoxxy(100,22); pprinttf(ppleasse
23、 chhoosee a nnumbeer beetweeen 1 and 2:); sscanff(%dd,&ssel); sswitcch(seel) casse 1:clrsscr( ); ggotoxxy(6,6); pprinttf(PPleasse innput gooddsnummber:); sscanff(%dd,&ddel_nnum); bbreakk; casse 2:clrsscr( ); ggotoxxy(6,6); pprinttf(PPleasse innput gooddsnamme:); sscanff(%ss,&nname); bbreakk; wwhilee
24、(sell!=1&sell!=2); ptr11=heaad; if(ptr11-nuum=ddel_nnum|(strrcmp(ptr11-naame,nname)=0) heead=pptr1-nexxt; prrintff(Suuccesss too dellect gooddsmesssagee!n); ellse /*判判斷是否是是目標結(jié)點點*/ whille(pttr1!=NULLL&pttr1-num!=dell_numm&sttrcmpp(ptrr1-nname,namee)!=00) ptrr2=pttr1; ptrr1=pttr1-nextt;ptr1-priior=ppt
25、r2; iif(pttr1-num=dell_numm|(sstrcmmp(pttr1-namee,namme)=0) pttr2-nextt=ptrr1-nnext; pttr1-nextt-prrior=ptr11-prrior; freee(pttr1); prrintff(nnSucccess to ddelecct gooodsmmessaage!nn); ellse pprinttf(nCannt ffind thiss gooodsmeessagge!nnn); priintf(Cottinuee to deleect?(yes or nno):); scaanf(%s,judg
26、ge); whhile(!strrcmp(judgge,yyes); clrrscr( ); gottoxy(20,110); priintf(Dellectiing ssucceess!n); gottoxy(18,111); priintf(Preess aany kkey tto baack tto laast MMenun); gottoxy(16,112); priintf(Andd makke suure tto Saave(66) thhem oor yoou wiill llose themm!n); gettch( ); retturn(headd); /*查找找模塊*/vo
27、id searrch( )charr namme100; charr juddge110; int sel; longg intt sell_numm; clrsscr( ); gotooxy(118,100); prinntf(Pleaase ppresss seaarcheed gooodsflieenamee:); headd=opeenfille( ); if(hhead=NULLL) retturn; elsee do do clrrscr( ); gottoxy(5,4); priintf(Pleease chooose tthe wway tto seearchh:); gott
28、oxy(1,9); priintf( *1.Searrch ddepennd onn gooodsnuumberrn); priintf( *1.Searrch ddepennd onn gooodsnaamenn); gottoxy(10,222); priintf(pleease chooose aa nummber betwween 1 annd 2:); scaanf(%d,&sell); swiitch(sel) casse 1:clrsscr( ); pprinttf(PPleasse innput gooddsnummber:); sscanff(%lld,&sel_num);
29、bbreakk; casse 2:clrsscr( ); priintf(Pleease inpuut gooodsnname:); sscanff(%ss,naame); bbreakk; whiile(ssel!=1&ssel!=2); pptr1=headd; wwhilee(ptrr1!=NNULL&ptrr1-nnum!=sel_num&strrcmp(ptr11-naame,nname)!=0) ptr11=ptrr1-nnext; iif (ptr11-nuum=ssel_nnum)|(sttrcmpp(ptrr1-nname,namee)=00) pprinttf(n Suuc
30、cesss too seaarch gooddsmesssagee!n); pprinttf(ggoodssnumbber gooddsnamme gooodsccounttnnn); pprinttf(PRRINT); eelse priintf(nCCantt finnd thhis ggoodssmesssage!nnn); priintf(Cottinuee to searrch?(yes or nno):); scaanf(%s,judgge); whille(!sstrcmmp(juudge,yess); ggotoxxy(100,24); pprinttf(PPleasse pr
31、ress any key to bback to llast Menuu:); ggetchh( ); /*輸出模模塊*/void prinnt( ) intt i=11; clrrscr( ); gottoxy(18,110); priintf(Pleease inpuut prrinteed gooods:); heaad=oppenfiile( ); if(headd=NUULL) retuurn; elsse clrsscr( ); prinntf( The prinnted resuult aas foollowws:nn); prinntf(gooddsnummber gooods
32、naame ggoodsscounntnn); ptr11=heaad; do pprinttf(PRRINT); pptr1=ptr11-neext; iif(i/10=1) /*超過十十行換頁*/ i=00; priintf(Preess aany kkey tto chhangee pagge:); gettch( ); clrrscr( ); gottoxy(0,6); priintf(gooodsnuumberr gooodsnaame ggoodsscounntnn); i=i+1; whiile(pptr1!=NULLL); ggotoxxy(100,24); pprinttf(
33、PPleasse prress any key to bback to llast Menuu:); ggetchh( ); /*保存模模塊*/void savee(COMM *heead) clrrscr(); gottoxy(8,133); priintf(Pleease inpuut saaved goodds(llimitt to lettter oor nuumberr):); scaanf(%s,); if(fp=fopeen(sttrcatt(),wb)=NNULL) /*以二二進制只寫寫方式打開開一個流*/ pprinttf(FFail to ccreatt FILLE!);
34、ggetchh( ); rreturrn; ptrr1=pttr2=hhead; whiile(pptr1!=NULLL) iff(fwrrite(ptr11,sizzeof(COM),1,ffp)!=1) prinntf(Faill to prinnt meessagge too FILLE!); getcch( ); retuurn; ptrr1=pttr1-nextt; fcllose(fp); gottoxy(10,224); priintf(Savving succcess!Presss anny keey too bacck too lasst Meenu:); gettch();
35、/*載入模模塊*/COM * opeenfille( )int n=1; scannf(%s,); if(fp=ffopenn(strrcat(),rrb)=NUULL) gottoxy(15,113); priintf(Thiis iisntt exiist,ppleasse chheck if eexistt.nppresss anyy keyy bacck too Mennu); gettch( ); retturn(NULLL); if(ptr11=ptrr2=(CCOM*)mallloc(LLEN)=NUULL) priintf(No enouugh mmemorry,faail t
36、to crreat linkklistt!nPPleasse prress any key backk to Menuun); getcch( ); retuurn(NNULL); if(ffreadd(ptrr1,siizeoff(COMM),1,fp)!=1) /*從fpp指向的流流中讀取11個字段,每每個字段為為COM的的字符長,并并把它們放放到ptrr1指向的的字符數(shù)組組中,文件件的位置指指示器隨著著所讀取的的字符數(shù)而而下移*/ prrintff(Faail tto prrint messsage fromm FILLE!nnPleaase ppresss anyy keyy bacc
37、k too Mennun); geetch( ); reeturnn(NULLL); if(pptr1-nexxt=NNULL) heaad=pttr1; elsee doo iff(n=1) heead=pptr1; elsse pttr2-nextt=ptrr1; n=nn+1; ptrr2=pttr1; if(ptrr1=(CCOM*)mallloc(LLEN)=NUULL) pprinttf(NNo ennoughh memmory,faill to creaat liinkliist!nPleease presss anny keey too bacck too Mennun); g
38、eetch( );rreturrn(NUULL); if(freaad(pttr1,ssizeoof(COOM),11,fp)!=1) prrintff(Faail tto prrint messsage fromm FILLE!nnPleaase ppresss anyy keyy to backk to Menuun); gettch( );reeturnn(NULLL); whhile(ptr11-neext!=NULLL); pttr2-nextt=ptrr1; returrn(heead);fclosse(fpp); /*關(guān)閉文文件函數(shù)*/void mainn( )charr mes
39、ssagee = -*Thee insstrucctionn of GOODDS SYYSTEMM*- nnn YYou ccan iinputt manny kiinds of mmessaages,and you can use n gooodnaame aas n TThis SYSTTEM ccan ddo opperattion likee inssert or ddelecct too thee n gooodsmmessaage tthat havee savved,tthen saveed aggain.whille yoou n ccan ssearcch meessagge
40、 deependd on the gooddsnubb or gooddsnamme. nnnn -*WWelcoome tto ennter the GOODDS SYYSTEMM!*- nn ;Char menuu=*MMENU* nnn *1.IInputt n *2.OOutpuut n *3.IInserrt n *4.Deeletee n *5.SSearcch n *6.SSave n *0.EExit n;int ssel;delayy(10);textbbackggrounnd(LIIGHTGGRAY);textccolorr(BLUUE); /*背景為銀銀灰色,字字為藍色*
41、/clrsccr( );gotoxxy(4,8);printtf(%s,mmessaage);gotoxxy(100,22);printtf( PPleasse prress any key intoo thee Mennu!);getchh( );doclrsscr( );gotoxxy(1,7);printtf(%s,mmenu);gotoxxy(100,20);printtf(ppleasse chhoosee a nnumbeer frrom 00 to 6:);scanff(%dd,&ssel);switcch(seel)casee 1:hhead=inpuut( ); /*輸入模塊
42、塊*/ bbreakk; casee 2:pprintt( ); /*輸出模塊塊*/ bbreakk; casee 3:hhead=inseert( ); /*插入模塊塊*/ bbreakk; casee 4:hhead=deleet( ); /*刪刪除模塊*/ bbreakk; casee 5:ssearcch( ); /*查找模塊塊*/ bbreakk; casee 6:ssave(headd); /*保保存模塊*/ bbreakk; casee 0:bbreakk;whille(seel!=00);五、調(diào)試分分析和測試試結(jié)果各模塊功能能測試:1.COMM *innput( )輸入入模塊功
43、能能測試用戶逐一輸輸入的數(shù)據(jù)據(jù)不斷添加加就形成了了一個列表表。前面已已經(jīng)表明本本系統(tǒng)的數(shù)數(shù)據(jù)結(jié)構(gòu)選選取動態(tài)數(shù)數(shù)據(jù)結(jié)構(gòu)雙向鏈表,因因此此列表表在內(nèi)存中中是以鏈表表的形式存存儲的。那那么輸入模模塊實際上上就是一個個建立鏈表表的操作模模塊。通過過模塊saave( )將內(nèi)存存中的已輸輸入的數(shù)據(jù)據(jù)存入到指指定路徑的的某*.datt文件中去去.特別指出: * 為為用戶自己己規(guī)定的貨貨品名。輸入條件: gooodsnuumb ld型,且0. 當=0時退出出 gooodsnname s 型型 gooodsccountt d型型,且00. 當0時顯示示輸入錯誤誤,重輸字字樣。 調(diào)用用savee( )時時 goo
44、os:d:pllfu輸出結(jié)果: 貨品保保存在用戶戶指定路徑徑的 *.dat文文件中以免免丟失。2Priint( )輸出模模塊可將指定文文件中的內(nèi)內(nèi)容顯示在在屏幕上。輸出條件:調(diào)用載入入模塊時,goos:d:pllfu輸出結(jié)果:如輸出條條件正確,則則可在屏幕幕上顯示如如下:goodssnumbb gooddsnamme gooddscouunt0001 a 12250002 b 2300003 c 1803. innsertt( )插入入模塊插入模塊要要完成的是是鏈表的插插入操作,即即將一個新新結(jié)點插入入一個已有有的鏈表中中。輸入條件:調(diào)用載入入模塊。ggoos:d:pllfu按貨品名的的numbber, nname, couunt 分分別輸入,如如輸錯則有有信息提示示。輸出結(jié)果:輸入正確確后,則顯顯示插入成成功,返回回菜單后,存存盤。4.Dellet( )刪除模模塊刪除模塊要要完成的是是鏈表的刪刪除操作,即即將一個結(jié)結(jié)點從已有有的鏈表中中刪除。輸入條件:調(diào)用載入入模塊。ggoos:d:pllfu有兩種刪除除方式按號號和名刪除除,如輸錯錯則有信息息提示。輸出結(jié)果:輸入正確確后,則顯顯示刪除成成功,返回回菜單后,存存盤。5.seaarch( )查找找模塊鏈表的查找找操作是指指在已知鏈鏈表中查找找值為某指指定值的結(jié)結(jié)點。輸入條件:調(diào)用載入入模塊。ggoos:d:pllfu
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 燃料倉儲安全企業(yè)制定與實施新質(zhì)生產(chǎn)力項目商業(yè)計劃書
- 高纖維谷物奶行業(yè)深度調(diào)研及發(fā)展項目商業(yè)計劃書
- 傳統(tǒng)小吃文化體驗館行業(yè)深度調(diào)研及發(fā)展項目商業(yè)計劃書
- 家庭田地分協(xié)議書
- 高精度聲速測量儀企業(yè)制定與實施新質(zhì)生產(chǎn)力項目商業(yè)計劃書
- 萬能險AI應(yīng)用行業(yè)深度調(diào)研及發(fā)展項目商業(yè)計劃書
- 鐵路信號中的通信技術(shù)鐵路通信概述92課件
- 《旅游英語》電子教案-Unit 5
- 語文新課標視域下傳統(tǒng)文化的教學(xué)現(xiàn)狀與策略
- 夏季高溫施工人員防護措施
- 2023學(xué)年完整公開課版劃船歌
- 嬰幼兒安全與意外事件防范培訓(xùn)課件
- AIAG-VDA-PFMEA表格模板(自動計算AP)
- 面試官認證考題
- 大樓內(nèi)衛(wèi)生間裝修改造工程施工組織設(shè)計
- 書法課特色端午(課件)小學(xué)生書法通用版
- 小學(xué)數(shù)學(xué)-角的度量教學(xué)設(shè)計學(xué)情分析教材分析課后反思
- 2022年上海高考英語真題試卷(含答案)
- 中國風故宮建筑介紹
- 《思想道德與法治》課件第四章明確價值要求踐行價值準則第三節(jié)積極踐行社會主義核心價值觀
- 2023年甘肅省天水市中考生物真題(含答案解析)
評論
0/150
提交評論