




版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、1引言21.1編寫目的21.2背景21.3定義21.4參考資料22程序系統(tǒng)的結構 23程序1 (標識符)設計說明 33.1程序描述123.2功能123.3性能123.4輸人項1133.5輸出項1133.6 算法1133.7流程邏輯1133.8 接口 1133.9存儲分配133.10注釋設計133.11限制條件133.12測試計劃133.13尚未解決的問題 1144程序2 (標識符)設計說明 114詳細設計說明書1引言1.1編寫目的為了更好的描述軟件結構以及系統(tǒng)各組成成分之間的相互關系,因此撰寫詳細設計說明書。1.2背景a待開發(fā)的軟件系統(tǒng)的名稱:大連交通大學學生選課系統(tǒng);b 本系統(tǒng)主要為方便廣大
2、學選課,避免選課高峰期選不上等問題;c.本系統(tǒng)的受益人為:老師、學生和系統(tǒng)管理人員。1.3定義詳見概要設計說明書。1.4參考資料【1】 張海藩,軟件工程導論【M】北京:清華大學出版社 2008年2月第五版【2】 王珊、薩師煊,數(shù)據(jù)庫系統(tǒng)概論【M】北京:高等教育出版社 2006年5 月第四版2程序系統(tǒng)的結構該詳細設計只針對學生信息管理中的信息查詢和信息維護兩個子功能作說明, 其程序流程圖如下:結束圖4-1學生信息查詢模塊程序流程圖Y圖4-2學生信息管理模塊程序流程圖3程序1 (標識符)設計說明#in clude#in cludeint N1,N2,kk1,kk2,kk3;struct couse
3、 * headl;struct stude nt * head2;struct couse/課程信息結構體int nu ml;char name120;int score;int n elepeo;/課程已選人數(shù)int Melepeo;/課程人數(shù)上限struct couse * n ext;struct stude nt/學生信息結構體int nu m2;char name220;int nelenum50;已選課程編號int nelen;已選課程數(shù)量struct stude nt * n ext;void Ms()for(kk1=0;kk11100;kk1+)for(kk2=0;kk2120
4、0;kk2+) for(kk3=0;kk3 num1,p1- name1, &p1-score,&p1-Melepeo);p1- n elepeo=0;head 仁NULL;while(p1- nu m1!=0)2= N1+1;if(N1=1)head 1= p1;else p2-n ext=p1;p2=p1;p1=(struct couse * )malloc(sizeof(struct couse);scan f(%d%s%d%d,&p1- nu m1,p1- namel, &p1-score,&p1-Melepeo);p1- n elepeo=0;p2- next=NULL;void f
5、ilec()/錄入鍵盤子函數(shù)(從文件錄入)FILE * fp;char 20;struct couse *p1,*p2;2= 0;printf(輸入要讀入的文件路徑:”);getchar();gets();if(fp=fope n( ,r)=NULL)printf(找不到 %s 文件!n,);exit(0);p1=p2=(struct couse*)malloc(sizeof(struct couse);fsca nf(fp,%d%s%d%d%d, &p1- num1,p1- namel,&p1-score,&p1- n elepeo,&p1-Melepeo);head 仁NULL;while
6、(!feof(fp)2= N1+1;if(N1=1)head 1= p1;else p2-n ext=p1;p2=p1;p1=(struct couse * )malloc(sizeof(struct couse);fsca nf(fp,%d%s%d%d%d, &p1- nu m1,p1- namel,&p1-score, &p1- nelepeo,&p1-Mele peo);p2- next=NULL;void inputc()錄入課程主函數(shù)int i;printf(ttt 錄入課程信息 n”);printf(n1.從鍵盤錄入 n);printf(2.從文件錄入n”);printf(3.返回
7、主菜單n”); printf(請選擇(13):n”); scan f(%d,&i);switch(i)case(1):keyboardc();break; case(2):filec();break; case(3):break;void inputs()錄入學生信息主函數(shù) int i;printf(ttt 錄入學生信息 n);printf(n1.從鍵盤錄入 n);printf(2.從文件錄入n”);printf(3.返回主菜單n”); printf(請選擇(13):n”);scan f(%d,&i);switch(i)case(1):keyboards();break; case(2):fi
8、les();break; case(3):break;void elective。/學生選課主函數(shù)int i;printf(ttt 學生選課 n);printf(1.查詢可選課程n”);printf(2.查詢已選課程n”);printf(3.返回主菜單n”); printf(請輸入(13):n);scan f(%d,&i);switch(i)case(1):cheak();break; case(2):hcheak();break; case(3):breakvoid listc()/輸出課程信息struct couse * p;p=head1;printf(”課程編號課程名稱學分 課程已選人
9、數(shù)課程人數(shù)上限n”);while(p!=NULL)prin tf(%-8d%10s%6d%8d%12dn,p- nu m1,p- name1,p-score,p- nelepeo,p-Melepeo); p=p-n ext;void lists()/輸出學生信息struct stude nt * p;p=head2;printf(學生學號學生姓名已選課程數(shù)量n);while(p!=NULL)prin tf(%-4d %10s %6dn,p- num2,p- name2,p- nele n);p=p-n ext;void intoc()/存儲課程信息FILE * fp;struct couse
10、* p;char 30;printf(輸入課程信息要保存的文件路徑:”);getchar();gets();if(fp=fope n( ,w)=NULL)printf(n 保存失敗!);exit(0);p=head1;while(p!=NULL)fprin tf(fp,%d %s %d %d %dn,p-nu m1,p-n ame1,p-score,p-n elepeo,p-Melepeo);p=p-n ext;fclose(fp);printf(課程信息已保存在%s中!n,);void intos()/存儲學生信息FILE * fp;struct stude nt * p;char 30;p
11、rintf(輸入學生信息要保存的文件路徑:”);getchar();gets();if(fp=fope n(,”w)=NULL)printf(n 保存失敗!);exit(0);p=head2;while(p!=NULL)fwrite(p,sizeof(struct stude nt),1,fp); p=p-n ext;fclose(fp);printf(學生信息已保存在%s中!n,);void into()/存儲信息int i;printf(1.存儲課程信息n);printf(2.存儲學生信息n);printf(3.返回主菜單n”);printf(” 請輸入(13)n);scan f(%d,&
12、i);switch(i)case(1):i ntoc();break;case(2):i ntos();break;case(3):break;void store()信息主函數(shù)int i;printf(tt系統(tǒng)信息查看及存儲n);printf(1.查看課程信息n);printf(2.查看學生信息n);printf(3.存儲信息 n”);printf(4.返回主菜單n”);printf(請輸入(14):n”);scan f(%d,&i);switch(i)case(1):listc();break;case(2):lists();break;case(3):i nto();break;int
13、main()/ 主函數(shù)int i;sta比!n);printf(nttt歡迎使用學生選課系統(tǒng)printf(菜單:n);printf(1.錄入課程信息n);printf(2.課程管理 n”);printf(3.錄入學生信息n);printf(4.學生信息管理n);printf(5.學生選課 n”);printf(6.系統(tǒng)信息查看及存儲n);printf(7.退出系統(tǒng) n”);printf(n請輸入菜單選項(17):n);scan f(%d,&i);if(i7)printf(輸入錯誤,請重輸:n); goto start;switch(i)case(1):system(cls);in putc()
14、;goto start;break;break;case(2):system(cls); man ageme ntc(); goto start; break;case(3):system(cls); in puts(); goto start; break;case(4):system(cls); man ageme nts(); goto start; break;case(5):system(cls);elective();goto start;case(6):system(cls);store();goto start;break;case(7):system(cls);printf(”感謝使用本系統(tǒng)!nn再見!n);return(O);3.1程序描述該程序能夠較全面的實現(xiàn)學生選課系統(tǒng),另還能進行學生信息管理和成績查 詢等等。3.2功能錄入課程信息、課程管理、錄入學生信息、學生信息管理
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 借款連帶保證合同(4篇)
- 2025年企業(yè)股份合作合同樣本
- 2025年典范工程招投標合同樣本
- 2025年屋頂空間租賃合同范本
- 2025年伙伴合作供需合同
- 2025年合作伙伴雇傭合同示范文本
- 咖啡豆與咖啡機2025年購銷合同
- 2025年優(yōu)惠合作合同協(xié)議模板
- 2025年機床設備采購與銷售合同樣本
- 2025年醫(yī)療服務外包護理員合同范本
- 三年級下冊數(shù)學課件 兩位數(shù)除兩、三位數(shù) 滬教版 (共15張PPT)
- 《六大茶類》講義
- Unit 2 Listening and speaking 課件-高中英語人教版(2019)選擇性必修第二冊
- X會計師事務所的J城投公司發(fā)債審計項目研究
- 中國傳媒大學全媒體新聞編輯:案例教學-課件-全媒體新聞編輯:案例教學-第7講
- 生理學泌尿系統(tǒng)6學時課件
- PySide學習教程
- 數(shù)據(jù)結構英文教學課件:chapter1 Introduction
- 人教三年級數(shù)學下冊表格式全冊
- 優(yōu)秀教研組評比制度及實施細則
- JJF 1752-2019全自動封閉型發(fā)光免疫分析儀校準規(guī)范(高清版)
評論
0/150
提交評論