歡迎來到裝配圖網(wǎng)! | 幫助中心 裝配圖網(wǎng)zhuangpeitu.com!
裝配圖網(wǎng)
ImageVerifierCode 換一換
首頁 裝配圖網(wǎng) > 資源分類 > DOC文檔下載  

產(chǎn)品進(jìn)銷存管理系統(tǒng) 課程設(shè)計(jì)報(bào)告書

  • 資源ID:44761444       資源大小:160.50KB        全文頁數(shù):17頁
  • 資源格式: DOC        下載積分:15積分
快捷下載 游客一鍵下載
會(huì)員登錄下載
微信登錄下載
三方登錄下載: 微信開放平臺(tái)登錄 支付寶登錄   QQ登錄   微博登錄  
二維碼
微信掃一掃登錄
下載資源需要15積分
郵箱/手機(jī):
溫馨提示:
用戶名和密碼都是您填寫的郵箱或者手機(jī)號(hào),方便查詢和重復(fù)下載(系統(tǒng)自動(dòng)生成)
支付方式: 支付寶    微信支付   
驗(yàn)證碼:   換一換

 
賬號(hào):
密碼:
驗(yàn)證碼:   換一換
  忘記密碼?
    
友情提示
2、PDF文件下載后,可能會(huì)被瀏覽器默認(rèn)打開,此種情況可以點(diǎn)擊瀏覽器菜單,保存網(wǎng)頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請(qǐng)使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站資源下載后的文檔和圖紙-無水印,預(yù)覽文檔經(jīng)過壓縮,下載后原文更清晰。
5、試題試卷類文檔,如果標(biāo)題沒有明確說明有答案則都視為沒有答案,請(qǐng)知曉。

產(chǎn)品進(jìn)銷存管理系統(tǒng) 課程設(shè)計(jì)報(bào)告書

中北大學(xué)數(shù) 據(jù) 結(jié) 構(gòu)課 程 設(shè) 計(jì) 說 明 書學(xué)生姓名:宋立群學(xué) 號(hào):1021011803學(xué) 院:軟件學(xué)院專 業(yè):軟件開發(fā)與測試題 目:產(chǎn)品進(jìn)銷存管理系統(tǒng)指導(dǎo)教師何志英2011年12月20日0 / 17(一)設(shè)計(jì)任務(wù)概述針對(duì)某一種行業(yè)的庫房的產(chǎn)品進(jìn)銷存情況進(jìn)行管理。1、采用一定的存儲(chǔ)結(jié)構(gòu)對(duì)庫房的貨品及其數(shù)量進(jìn)行分類管理;運(yùn)用鏈表進(jìn)行存儲(chǔ),同時(shí)用到指針變量,運(yùn)用循環(huán)存儲(chǔ),對(duì)存儲(chǔ)產(chǎn)品的信息要用到日期結(jié)構(gòu)體和產(chǎn)品結(jié)構(gòu)體,對(duì)存儲(chǔ)要用到文件指針以及文件的一些方法的使用。2、可以進(jìn)行產(chǎn)品類的添加、產(chǎn)品的添加、產(chǎn)品數(shù)量的添加; 首先要找到鏈表的指針變量,對(duì)指針變量進(jìn)行修改,然后再進(jìn)行產(chǎn)品的出入。3、能夠查詢庫房每種產(chǎn)品的總量、進(jìn)貨日期、銷出數(shù)量、銷售時(shí)間等; 首先要定義一個(gè)查詢函數(shù),對(duì)產(chǎn)品類的指針變量進(jìn)行循環(huán)查詢,再對(duì)產(chǎn)品的指針變量進(jìn)行循環(huán)查詢,找到產(chǎn)品時(shí),在調(diào)用顯示產(chǎn)品信息函數(shù),顯示查詢到的產(chǎn)品的各項(xiàng)信息。(二)本設(shè)計(jì)所采用的數(shù)據(jù)運(yùn)用鏈表進(jìn)行存儲(chǔ),同時(shí)用到指針變量,循環(huán)存儲(chǔ)(三)功能模塊詳細(xì)設(shè)計(jì)3.1詳細(xì)設(shè)計(jì)思想1、順序表掛接鏈表的抽象定義類型:ADT sqmountlink 數(shù)據(jù)對(duì)象:D=ai|aikindlist,i=1,2,n,n>=0 數(shù)據(jù)關(guān)系:R=<ai-1,ai>|ai-1,aiD,i=1,2,3,n 基本操作: InitMountLisr(&L) 操作結(jié)果:構(gòu)造一個(gè)空的順序表掛接鏈表L。 KindInsert(&L,n) 初始條件:順序表掛接鏈表L已存在。 操作結(jié)果:向順序表掛接鏈表L中添加N類產(chǎn)品ProductInsert(&L,I,n) 初始條件:順序表掛接鏈表L已存在且要將產(chǎn)品插入的產(chǎn)品類i已存在 操作結(jié)果:向順序表掛接鏈表L中的產(chǎn)品類i中添加N種產(chǎn)品ProQuantity_add(&L,I,e,n) 初始條件:順序表掛接鏈表L已存在且需要添加的產(chǎn)品及產(chǎn)品所屬的類也存在 操作結(jié)果:添加順序表掛接鏈表L的產(chǎn)品類i中的產(chǎn)品e的數(shù)量Visit(&L,i,e) 初始條件:順序表掛接鏈表L已存在且待查詢的產(chǎn)品所屬產(chǎn)品類i也存在 操作結(jié)果:在順序表掛接鏈表L中查詢產(chǎn)品e的各項(xiàng)信息DisplayList(&L) 初始條件:順序表掛接鏈表L已存在 操作結(jié)果:現(xiàn)實(shí)順序表掛接鏈表L的內(nèi)容3.2核心代碼#include<stdio.h>#include<stdlib.h>#include<string.h>#define ok 1#define error 0#define overflow 0#define SQMOUNTLINK_INIT_SIZE 100#define SQMOUNTLINKINCREMENT 10typedef struct date int year; int month; int day;date; /日期typedef struct productlnode char pname30; /產(chǎn)品名稱 int totalquantity; /產(chǎn)品總量 date goodsdate; /進(jìn)貨日期 int salesquantity; /消除數(shù)量 date salestime; /銷售時(shí)間 struct productlnode *nextproduct;productlnode,*plinklist;typedef struct kindlnode productlnode *firstproduct; char pkindname30;kindlnode;typedef struct kindlnode *kindelem; int length; int listsize;sqmountlink;int InitMountList(sqmountlink &L) /初始化一個(gè)空的順序表掛接鏈表L int i; L.kindelem=(kindlnode*)malloc(SQMOUNTLINK_INIT_SIZE*sizeof(kindlnode); if(!L.kindelem) exit(overflow); L.length=0; L.listsize=SQMOUNTLINK_INIT_SIZE; for(i=0;i<L.listsize;i+) (L.kindelemi).firstproduct=NULL; return ok;/InitMountListint KindInsert(sqmountlink &L,int n) /向順序表掛接鏈表L中添加N類產(chǎn)品 int i; kindlnode *newbase; if(L.length+n>=L.listsize) newbase=(kindlnode*)realloc(L.kindelem,(L.listsize+n)*sizeof(kindlnode); if(!newbase) exit(overflow); L.kindelem=newbase; L.listsize+=n; printf("需添加的產(chǎn)品類名稱:n"); for(i=0;i<n;i+) scanf("%s",&L.kindelemL.length.pkindname); L.kindelemL.length.firstproduct=NULL; L.length+; return ok;/KindInsertint ProductInsert(sqmountlink &L,char pkindname2,int n) /向順序表掛接鏈表L的某產(chǎn)品類中添加N個(gè)產(chǎn)品 plinklist p,q; int k,j; for(k=0;k<L.length;k+) if(strcmp(L.kindelemk).pkindname,pkindname2)!=0) continue; else break; if(L.kindelemk.firstproduct=NULL) q=(plinklist)malloc(sizeof(productlnode); printf("輸入此產(chǎn)品類所含產(chǎn)品的產(chǎn)品名稱、總量、進(jìn)貨日期、銷售數(shù)量、銷售時(shí)間:n"); scanf("%s %d %d,%d,%d %d %d,%d,%d",&(q->pname),&(q->totalquantity),&(q->goodsdate).year),&(q->goodsdate).month),&(q->goodsdate).day),&(q->salesquantity),&(q->salestime).year),&(q->salestime).month),&(q->salestime).day); q->nextproduct=NULL; (L.kindelemk).firstproduct=q; for(j=1;j<n;j+) p=(plinklist)malloc(sizeof(productlnode); printf("輸入此產(chǎn)品類所含產(chǎn)品的產(chǎn)品名稱、總量、進(jìn)貨日期、銷售數(shù)量、銷售時(shí)間:n"); scanf("%s %d %d,%d,%d %d %d,%d,%d",&(p->pname),&(p->totalquantity),&(p->goodsdate).year),&(p->goodsdate).month),&(p->goodsdate).day),&(p->salesquantity),&(p->salestime).year),&(p->salestime).month),&(p->salestime).day); p->nextproduct=q->nextproduct; q->nextproduct=p; q=p; else for(q=L.kindelemk.firstproduct; ;q=q->nextproduct) if(!(q->nextproduct) break; printf("需添加產(chǎn)品的名稱、總量、進(jìn)貨日期、銷售數(shù)量、銷售時(shí)間:n"); for(j=0;j<n;j+) p=(plinklist)malloc(sizeof(productlnode); scanf("%s %d %d,%d,%d %d %d,%d,%d",&(p->pname),&(p->totalquantity),&(p->goodsdate).year),&(p->goodsdate).month),&(p->goodsdate).day),&(p->salesquantity),&(p->salestime).year),&(p->salestime).month),&(p->salestime).day); p->nextproduct=q->nextproduct; q->nextproduct=p; q=p; return ok;/ProductInsertvoid ProQuantity_add(sqmountlink &L,char pkindname1,char pname1,int n) /添加順序表掛接鏈表L的某產(chǎn)品類中的某產(chǎn)品的總量,且需添加的產(chǎn)品總量為n int i,k; plinklist p; for(i=0;i<L.length;i+) if(strcmp(L.kindelemi).pkindname,pkindname1)!=0) continue; else break; if(i<L.length) for(p=L.kindelemi.firstproduct;p!=NULL;p=p->nextproduct) k=strcmp(p->pname,pname1); if(k=0) p->totalquantity=p->totalquantity+n; printf("查看添加后產(chǎn)品的各項(xiàng)輸出:%s %d %d,%d,%d %d %d,%d,%dn",p->pname,p->totalquantity,(p->goodsdate).year,(p->goodsdate).month,(p->goodsdate).day,p->salesquantity,(p->salestime).year,(p->salestime).month,(p->salestime).day); /ProQuantity_addvoid ProQuantity_subtract(sqmountlink &L,char pkindname4,char pname4,int n) /添加順序表掛接鏈表L的某產(chǎn)品類中的某產(chǎn)品銷出數(shù)量,且銷出的數(shù)量n int i,k; plinklist p; for(i=0;i<L.length;i+) if(strcmp(L.kindelemi).pkindname,pkindname4)!=0) continue; else break; if(i<L.length) for(p=L.kindelemi.firstproduct;p!=NULL;p=p->nextproduct) k=strcmp(p->pname,pname4); if(k=0) p->salesquantity=p->salesquantity+n; printf("查看添加后產(chǎn)品的各項(xiàng)輸出:%s %d %d,%d,%d %d %d,%d,%dn",p->pname,p->totalquantity,(p->goodsdate).year,(p->goodsdate).month,(p->goodsdate).day,p->salesquantity,(p->salestime).year,(p->salestime).month,(p->salestime).day); /ProQuantity_subtractvoid Visit(sqmountlink &L,char pkindname3,char pname3) /在順序表掛接鏈表L中,查詢屬于某產(chǎn)品類的某產(chǎn)品的各項(xiàng)信息 int i,k; plinklist p; for(i=0;i<L.length;i+) if(strcmp(L.kindelemi).pkindname,pkindname3)!=0) continue; else break; if(i<L.length) for(p=L.kindelemi.firstproduct;p!=NULL;p=p->nextproduct) k=strcmp(p->pname,pname3); if(k=0) break; if(k!=0) printf("此產(chǎn)品不存在:n"); else printf("輸出待查詢產(chǎn)品的各項(xiàng)信息:n"); printf("產(chǎn)品類產(chǎn) 品產(chǎn)品總量進(jìn) 貨 日 期銷售數(shù)量銷 售 時(shí) 間n"); printf("%s %s %d %d,%d,%d %d %d,%d,%dn",(L.kindelemi).pkindname,p->pname,p->totalquantity,(p->goodsdate).year,(p->goodsdate).month,(p->goodsdate).day,p->salesquantity,(p->salestime).year,(p->salestime).month,(p->salestime).day); /Visitvoid DisplayList(sqmountlink &L) /顯示各產(chǎn)品所屬產(chǎn)品類、產(chǎn)品名稱、產(chǎn)品總量、進(jìn)貨日期、銷售數(shù)量、銷售時(shí)間 int i; plinklist p; printf("產(chǎn)品類產(chǎn) 品產(chǎn)品總量進(jìn) 貨 日 期銷售數(shù)量銷 售 時(shí) 間n"); for(i=0;i<L.length;i+) if(!(L.kindelemi.firstproduct) printf("%sn",(L.kindelemi).pkindname); for(p=L.kindelemi.firstproduct;p;p=p->nextproduct) printf("%s %s %d %d,%d,%d %d %d,%d,%dn",(L.kindelemi).pkindname,p->pname,p->totalquantity,(p->goodsdate).year,(p->goodsdate).month,(p->goodsdate).day,p->salesquantity,(p->salestime).year,(p->salestime).month,(p->salestime).day); /DisplayListvoid menu_operation()/操作菜單 printf("n"); printf("輸入所要執(zhí)行的操作:n"); printf("1、產(chǎn)品類添加: n"); printf("2、產(chǎn)品添加: n"); printf("3、產(chǎn)品數(shù)量添加: n"); printf("4、產(chǎn)品售出: n"); printf("5、查詢產(chǎn)品: n"); printf("0、退出程序: n"); printf("n");/mene_operation/*-主程序-*/void main(void) int order; int i,n; char a30; char b30; sqmountlink L; InitMountList(L); printf("輸入時(shí)間時(shí)請(qǐng)按照“年,月,日”格式輸入.n"); loop: menu_operation(); printf("輸入命令:"); scanf("%d",&order); switch(order) case 1: printf("需添加產(chǎn)品類的個(gè)數(shù):"); scanf("%d",&i); KindInsert(L,i); printf("修改后的產(chǎn)品庫存管理表:n"); DisplayList(L); goto loop; case 2: printf("需添加產(chǎn)品所屬產(chǎn)品類的名稱:"); scanf("%s",&a); printf("需向此產(chǎn)品類添加產(chǎn)品的個(gè)數(shù):"); scanf("%d",&i); ProductInsert(L,a,i); printf("修改后的產(chǎn)品庫存管理表:n"); DisplayList(L); goto loop; case 3: printf("輸入需添加數(shù)量的產(chǎn)品所屬產(chǎn)品類的名稱:"); scanf("%s",&a); printf("輸入需添加數(shù)量的產(chǎn)品的名稱:"); scanf("%s",&b); printf("輸入需添加產(chǎn)品的數(shù)量:"); scanf("%d",&n); ProQuantity_add(L,a,b,n); printf("修改后的產(chǎn)品庫存管理表:n"); DisplayList(L); goto loop; case 4: printf("輸入售出產(chǎn)品所屬產(chǎn)品類的名稱:"); scanf("%s",&a); printf("輸入售出產(chǎn)品的名稱:"); scanf("%s",&b); printf("輸入售出產(chǎn)品的數(shù)量:"); scanf("%d",&n); ProQuantity_subtract(L,a,b,n); printf("修改后的產(chǎn)品庫存管理表:n"); DisplayList(L); goto loop; case 5: printf("輸入待查詢產(chǎn)品所屬產(chǎn)品類的名稱:"); scanf("%s",&a); printf("輸入待查詢產(chǎn)品的名稱:"); scanf("%s",&b); Visit(L,a,b); goto loop; case 0: exit(0); 3.3程序運(yùn)行結(jié)果 程序啟動(dòng)界面。產(chǎn)品類的添加。產(chǎn)品的添加。產(chǎn)品數(shù)量的添加。 產(chǎn)品售出。產(chǎn)品查詢。 (四) 課程設(shè)計(jì)心得,存在問題及解決方法 拿到這道題時(shí),我沒有選擇自己去編寫,我想我從來沒有編過這么復(fù)雜的程序,一定編不成,我選擇了上網(wǎng)去查,值得慶幸的是我找到了一部分的程序,然后拷貝上程序在機(jī)房運(yùn)行,發(fā)現(xiàn)有許多錯(cuò)誤,我就開始一個(gè)一個(gè)解決問題,其中有些問題是一些符號(hào)的丟失,還有頭文件的錯(cuò)誤運(yùn)用,還有對(duì)一些輸入超出程序范圍的數(shù)據(jù)進(jìn)行修改,才使程序得以繼續(xù)進(jìn)行,最后我通過自己和請(qǐng)教同學(xué),最終整個(gè)程序得以運(yùn)行,不過最重要的不是僅僅讓程序運(yùn)行成功,而是了解整個(gè)程序的思想設(shè)計(jì)和功能的實(shí)現(xiàn),然后我開始翻譯程序,把每一句都弄的清清楚楚為止,從中我復(fù)習(xí)了很多知識(shí)點(diǎn),也學(xué)到了很多我以前不知道的東西。通過對(duì)本系統(tǒng)的開發(fā),我對(duì)軟件開發(fā)過程有了更清楚地了解,首先是問題的定義,需求分析,然后概要設(shè)計(jì),詳細(xì)設(shè)計(jì)等,讓我知道了僅僅學(xué)習(xí)課本知識(shí)是不行的,還得經(jīng)常去自己設(shè)計(jì)一些小的項(xiàng)目去發(fā)現(xiàn)問題,必須培養(yǎng)動(dòng)手能力,這樣才能既復(fù)習(xí)了知識(shí)點(diǎn),又可以學(xué)會(huì)詳細(xì)的數(shù)據(jù)結(jié)構(gòu)思想和設(shè)計(jì),所以我在以后一定要加強(qiáng)這方面的學(xué)習(xí)。 溫馨提示:最好仔細(xì)閱讀后才下載使用,萬分感謝!

注意事項(xiàng)

本文(產(chǎn)品進(jìn)銷存管理系統(tǒng) 課程設(shè)計(jì)報(bào)告書)為本站會(huì)員(優(yōu)***)主動(dòng)上傳,裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。 若此文所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng)(點(diǎn)擊聯(lián)系客服),我們立即給予刪除!

溫馨提示:如果因?yàn)榫W(wǎng)速或其他原因下載失敗請(qǐng)重新下載,重復(fù)下載不扣分。




關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

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

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


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