C語言課程設(shè)計-身份證管理系統(tǒng)軟件_第1頁
C語言課程設(shè)計-身份證管理系統(tǒng)軟件_第2頁
C語言課程設(shè)計-身份證管理系統(tǒng)軟件_第3頁
C語言課程設(shè)計-身份證管理系統(tǒng)軟件_第4頁
C語言課程設(shè)計-身份證管理系統(tǒng)軟件_第5頁
已閱讀5頁,還剩13頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、C語言課程設(shè)計報告題 目身份證信息管理軟件學(xué) 號姓 名年級專業(yè)同組人員指導(dǎo)教師完成日期年月日安徽師范大學(xué)物理與電子信息學(xué)院College of Physics and Electronic Information, Anhui Normal University目錄一、 身份證信息管理軟件設(shè)計目的二、身份證信息管理軟件設(shè)計基本要求三、身份證信息管理軟件程序清單四、身份證信息管理軟件設(shè)計流程圖五、身份證信息管理軟件程序截圖六、身份證信息管理軟件運(yùn)行結(jié)果截圖七、身份證信息管理軟件設(shè)計總結(jié)一、身份證信息管理軟件設(shè)計目的綜合運(yùn)用所學(xué)程序設(shè)計的知識,完成問題分析、模塊設(shè)計、代碼編寫、程序調(diào)試和運(yùn)行等訓(xùn)練

2、任務(wù)。通過課程設(shè)計,初步鍛煉運(yùn)用所學(xué)基礎(chǔ)知識解決實(shí)際問題的能力,掌握軟件開發(fā)的基本過程和基本方法以及良好的編程風(fēng)格,培養(yǎng)在軟件開發(fā)中相互合作的團(tuán)隊(duì)意識。二、身份證信息管理軟件設(shè)計基本要求1.具備添加、刪除功能;2.具備多種查詢功能:按年齡、出生日期等;3.具備統(tǒng)計功能,能統(tǒng)計某年齡段的人數(shù);4.在此基礎(chǔ)上,可進(jìn)行文件操作。三、身份證信息管理軟件程序清單#include#include#define SIZE 50#define LENGTH sizeof (struct person)struct person char IDNumber20; char name20; char birthd

3、ay15; char nation10; char sex10; char address100;perSIZE;void main() int input(int n); void edit(int n); void add(int n); void del(int n); void print(); void statistic(int n); void save();printf(ttt*n);printf(tttShen Fen Zheng Xin Xi Guan Li Xi Tongn);printf(ttt*ntttt-ShengDuoZheng WangZuXuan WuXuBi

4、nn);printf(ntttt1.creat new filenntttt2.edit the informationnntttt3.add personsnntttt4.delete personsnntttt5.printf informationnntttt6.statistic personsnntttt7.exitn);printf(Please input your choice:);scanf(%d,&c); switch(c) case 1:input(c);break;case 2:edit(c);break;case 3:add(c);break;case 4:del(c

5、);break;case 5:print(c);break;case 6:statistic(c);break;case 7:exit(c);break;default:printf(errorn); int input(int n) int j;printf(How many persons do you want to input:); scanf(%d,&n);if(nSIZE)printf(errorn);else if(n=SIZE)for(j=0;jn;j+) printf(Please input the %dth persons informationn,j+1);printf

6、(ID Number:);scanf(%s,perj.IDNumber); printf(n); printf(The name:); scanf(%s,); printf(n); printf(The birthday:); scanf(%s,perj.birthday);printf(n);printf(The nation:);scanf(%s,perj.nation);printf(n);printf(Sex:);scanf(%s,perj.sex);printf(n);printf(The address:);scanf(%s,perj.address);print

7、f(n);save(); void edit(int n) int i,t,m; char num20; FILE *fp; if (fp=fopen(per.txt,rb)=NULL) printf(cannot open filen);return; for(m=0;mn;m+) fread(&perm,LENGTH,1,fp); printf(Please input the persons ID Number:); scanf(%s,num); for(t=0;tn;t+) if(strcmp (pert.IDNumber,num)=0) i=t; printf(please inpu

8、t the %dth persons information,i+1); printf(The ID Number:); scanf(%s,peri.IDNumber); printf(n); printf(The Name:); scanf(%s,); printf(n); printf(The birthday:); scanf(%s,peri.birthday); printf(n); printf(The nation:); scanf(%s,peri.nation); printf(n); printf(Sex:); scanf(%s,peri.sex); prin

9、tf(n); printf(The Address:); scanf(%s,peri.address); printf(n); fwrite(&peri,LENGTH,1,fp); fclose(fp);void add(int n) int i,m,t; FILE *fp; if(fp=fopen(per.txt,rb)=NULL) printf(cannot open filen);return; for(t=0;tSIZE) printf(errorn); else for(m=n-i;mn;m+) printf(please input a persons imformation:n)

10、;printf(The ID Number:);scanf(%s,perm.IDNumber);printf(n);printf(The Name:);scanf(%s,);printf(n); printf(The birthday:);scanf(%s,perm.birthday);printf(n);printf(The nation:);scanf(%s,perm.nation);printf(n); printf(Sex); scanf(%s,perm.sex); printf(n);printf(The Address:); scanf(%s,perm.addre

11、ss);printf(n);fwrite(&perm,LENGTH,1,fp);fclose(fp); void del(int n) char Name20;int i,t,m;FILE *fp;if(fp=fopen(per.txt,rb+)=NULL)printf(cannot open the filen);return;for(m=0;mn;m+)fread(&perm,LENGTH,1,fp);printf(please input the persons name that you want to delete:);scanf (%s,Name);for (i=0;in;i+)i

12、f (strcmp(,Name)=0) t=i;for(;!=0;t+)pert=pert+1;fclose(fp);void print(int n) int i,t;char Name20;FILE *fp;if(fp=fopen(per.txt,rb)=NULL)printf(cannot open the filen);return;printf(please input the persons name whose imformatin you want to cook );scanf(%s,Name);for(i=0;in;i+)if (strc

13、mp(,Name)=0) t=i;fread(&pert,LENGTH,1,fp);printf(IDNumber:%snname:%snbirthday:%snnation:%snSex:%snaddress:%sn,pert.IDNumber,,pert.birthday,pert.nation,pert.sex,pert.address);fclose(fp);void statistic(int n) int a,b,i,total=0; int c,age; FILE*fp; scanf(%d,&c); age=2010-c; printf(Ple

14、ase input the age from a to b:); if(fp=fopen(per.txt,rb)=NULL) printf(cannot open filen);return; for(i=0;in;i+) fread(&peri,LENGTH,1,fp);scanf(%d,%d,&a,&b);for(i=0;i=a&age=b)printf(IDNumber:%snname:%snAge:%dnnation:%snSex:naddress:%sn,peri.IDNumber,,peri.birthday,peri.nation,peri.sex,peri.a

15、ddress);total=total+1;void save() int j; FILE *fp; if(fp=fopen(per.txt,wb)=NULL) printf(cannot open the filen);return; for(j=0;jSIZE;j+) if(fwrite(&perj,LENGTH,1,fp)!=1) printf(file write errorn); fclose (fp);四、身份證信息管理軟件設(shè)計流程圖開始做出選擇選項(xiàng)1,2,3選項(xiàng)4,5,6選擇1輸入身份證號碼、姓名等編輯已輸入的信息增加人員信息刪除無用信息顯示所有信息統(tǒng)計人員信息選擇2選擇3選擇4選擇5選擇6每一步所有信息全部保存文件中,備用結(jié)束五、身份證信息管理軟件程序截圖1、主函數(shù)2、錄入函數(shù)3、編輯函數(shù)截圖4、添加函數(shù)截圖5、刪除函數(shù)截圖6、顯示函數(shù)截圖7、統(tǒng)計函數(shù)截圖8、信息保存文件函數(shù)截圖六、身份證信息管理軟件運(yùn)行結(jié)果截圖1、錄入信息截圖2、編輯信息截圖3、添加信息截圖4、刪除信息截圖5、顯示信息截圖6、統(tǒng)計信息截圖7、信息保存文件截圖七、身份證信息管理軟件設(shè)計總結(jié)1、對C語言的進(jìn)一步學(xué)習(xí)認(rèn)識 通過這次的身份證信息管理軟件的設(shè)計,加深了我們對C語言的學(xué)習(xí)認(rèn)識,在設(shè)計的過程中,我們對書本知識進(jìn)一步加深學(xué)習(xí)。2、鍛煉搜索、查閱資料的能

溫馨提示

  • 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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論