




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、算法與數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì)綜合設(shè)計(jì)報(bào)告第44頁(yè) 共44頁(yè)2008-2009學(xué)年度第二學(xué)期XXXX學(xué)院數(shù)學(xué)與計(jì)算機(jī)科學(xué)學(xué)院算法與數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì)綜合設(shè)計(jì)報(bào)告課程設(shè)計(jì)名稱:銀行業(yè)務(wù)管理模擬專 業(yè):計(jì)算機(jī)科學(xué)與技術(shù)班 級(jí):0X計(jì)本(X)班 學(xué) 號(hào): 0X0X030XX姓 名:高XX指 導(dǎo) 教 師:肖XX課程設(shè)計(jì)報(bào)告設(shè)計(jì)項(xiàng)目編號(hào)01名稱銀行業(yè)務(wù)管理模擬實(shí)驗(yàn)課時(shí)5主要儀器設(shè)備PC機(jī)附屬設(shè)備優(yōu)盤主要使用軟件Win-TC實(shí)驗(yàn)時(shí)間2009年3月-5月1.問題的描述和分析商業(yè)銀行業(yè)務(wù)模擬是對(duì)商業(yè)銀行柜面業(yè)務(wù)進(jìn)行模擬實(shí)習(xí)課程。隨著金融業(yè)和信息技術(shù)的不斷發(fā)展,銀行的管理也已經(jīng)和計(jì)算機(jī)接軌,實(shí)現(xiàn)了信息的數(shù)字化管理,了解并
2、掌握商業(yè)銀行柜臺(tái),周期業(yè)務(wù)的實(shí)際操作處理方法,了解現(xiàn)今商業(yè)銀行綜合業(yè)務(wù)系統(tǒng)的軟件應(yīng)用,著重于對(duì)學(xué)生實(shí)際操作能力的訓(xùn)練,使學(xué)生能初步具備工作崗位的適應(yīng)各個(gè)業(yè)務(wù)的編程操作能力。多了解各行業(yè)編程需求,減少學(xué)生踏上工作崗位的適應(yīng)磨合時(shí)間,提高就業(yè)競(jìng)爭(zhēng)力,突出應(yīng)用型人才的培養(yǎng)目標(biāo)。下面我將對(duì)現(xiàn)行銀行業(yè)務(wù)管理進(jìn)行小部分模擬設(shè)計(jì)。寫一個(gè)上述銀行業(yè)務(wù)管理系統(tǒng),能夠?qū)崿F(xiàn)一些常用功能,如:制卡,發(fā)卡,存款,取款。用于對(duì)用戶信息進(jìn)行管理,并能進(jìn)行修改,查找,顯示,求和等操作。2.算法的設(shè)計(jì)概要設(shè)計(jì):銀 行 業(yè) 務(wù) 管 理 模 擬 統(tǒng)存款取款銀 行 業(yè) 務(wù) 管 理 模 擬 統(tǒng)存款取款報(bào)表消費(fèi)查找記錄改密退出制卡發(fā)卡建
3、立銀行卡管理系統(tǒng),該系統(tǒng)的主要模塊為: (1)實(shí)現(xiàn)系統(tǒng)內(nèi)制卡、發(fā)卡功能;(2)實(shí)現(xiàn)系統(tǒng)內(nèi)帳戶和相關(guān)帳戶管理;(3)實(shí)現(xiàn)卡交易和合法性檢查;(4)實(shí)現(xiàn)卡金融交易積分功能;(5)實(shí)現(xiàn)卡報(bào)表功能;(6)數(shù)據(jù)以文件形式存儲(chǔ)在編輯過程中,需要使用串,查找等算法,同時(shí)需要對(duì)輸入的信息進(jìn)行存儲(chǔ)。在制卡發(fā)卡后,對(duì)用戶的信息進(jìn)行查找,并顯示出來。void load() FILE *fp1; if(fp1=fopen(c:/user.txt,r)=NULL) printf(nCan not open the filen); exit(0); for(N=0;!feof(fp1);N+) fscanf(fp1,%d
4、%s%s%s%f%d%d,&uN.cardNO,uN.name,uN.adnum,uN.code,&uN.left,&uN.exp,&uN.flag); return(N); fclose(fp1);3.數(shù)據(jù)結(jié)構(gòu)的設(shè)計(jì)串是非數(shù)值處理中的主要對(duì)象,我們一般用串來表示字符流。而這個(gè)程序中要處理的就是銀行類的字符流,所以我們需要用到串來實(shí)現(xiàn)這一功能。串的存儲(chǔ)表示有三種形式,第一種是定長(zhǎng)順序存儲(chǔ)結(jié)構(gòu)。第二種是塊鏈?zhǔn)酱鎯?chǔ)結(jié)構(gòu)。第三種是堆分配存儲(chǔ)結(jié)構(gòu)。在這里,我們采用串的第一種存儲(chǔ)方式定長(zhǎng)順序存儲(chǔ),而在程序編譯時(shí),要給出確定的空間大小,所以我們將串的空間大小設(shè)計(jì)為100個(gè)字符。#define MAXSIZ
5、E 100結(jié)構(gòu)體定義如下:struct user u /*信用卡結(jié)構(gòu)體*/ int cardNO; /*卡數(shù)*/ char name20; /*姓名*/ char adnum22; /*信用卡號(hào)*/ char code8; /*密碼*/ float left; /*余額/存款*/ int exp; /*消費(fèi)*/ int flag; /*確定是新卡還是舊卡*/uM;4.具體程序的實(shí)現(xiàn)首先是系統(tǒng)內(nèi)的制卡功能: 用戶輸入一個(gè)申請(qǐng)的卡號(hào) 用戶輸入一個(gè)申請(qǐng)的卡號(hào)錯(cuò)誤 重新輸入是否有19位N錯(cuò)誤 重新輸入Y卡號(hào)已經(jīng)存在需要重新輸入記錄中卡號(hào)卡號(hào)已經(jīng)存在需要重新輸入是否已經(jīng)存在 調(diào)函數(shù)N根據(jù)實(shí)際對(duì)密碼等回菜
6、單賦初值回菜單#include#include #include#include #define M 100 /*定義的數(shù)組上限*/int N; /*結(jié)構(gòu)體數(shù)組下標(biāo)量*/int H; /*幫助確定是否保存文件*/struct user u /*信用卡結(jié)構(gòu)體*/ int cardNO; /*卡數(shù)*/ char name20; /*姓名*/ char adnum22; /*信用卡號(hào)*/ char code8; /*密碼*/ float left; /*余額/存款*/ int exp; /*消費(fèi)*/ int flag; /*確定是新卡還是舊卡*/uM;5.界面設(shè)計(jì)本程序的主控菜單如下:1.申請(qǐng)一個(gè)卡
7、號(hào)2.使用這個(gè)卡號(hào)3.打印消費(fèi)記錄4.存款功能5.取款功能6.消費(fèi)功能7.報(bào)表功能8.查找消費(fèi)記錄9.修改密碼int menu(void) int x; do printf(ttn); printf(tt| (1)Apply for one blank card |n); printf(tt| (2)Use one blank card |n); printf(tt| (3)Print the record |n); printf(tt| (4)Store the money |n);printf(tt| (5)Fetch the money |n); printf(tt| (6)Spend
8、the money |n); printf(tt| (7)Save the file |n); printf(tt| (8)Search the record |n); printf(tt| (9)Change the passward |n); printf(tt| (0)quit the system |n); printf(tttPlease input your choice (0-10):( )bbb); scanf(%d,&x); if(x10) printf(ttt Error! Input again.); while(x10); return (x);.制卡void make
9、(struct user u) int i; char a22; load(); /*讀取文件中的可用空卡條數(shù)*/ do printf(nnEnter the AD number of the card:n); scanf(%s,a); if(strlen(a)!=19) printf(nnntt* Mistaken ID,please enter again*nn); continue; for(i=0;iN;i+) if(strcmp(ui.adnum,a)=0) printf(nntt* The AD number exists,please enter again *nn); brea
10、k; while(strlen(a)!=10)|strcmp(ui.adnum,a)=0); uN.cardNO=N; strcpy(uN.name,*); strcpy(uN.adnum,a); strcpy(uN.code,000000); uN.flag=-1; uN.left=0.00; uN.exp=0; N+; H=1; printf(nnntt* Successfully applied!*nn); printf(nntPress any key to returnnn); getchar();其中void load() FILE *fp1; if(fp1=fopen(c:/us
11、er.txt,r)=NULL) printf(nCan not open the filen); exit(0); for(N=0;!feof(fp1);N+) fscanf(fp1,%d%s%s%s%f%d%d,&uN.cardNO,uN.name,uN.adnum,uN.code,&uN.left,&uN.exp,&uN.flag); return(N); fclose(fp1);使用該程序,要現(xiàn)在c盤建立一個(gè)名為user.txt的文件。發(fā)卡: void deliever(struct user u) int i; char a20; float b; char code28; for(i
12、=0;iN) printf(nnntt*Have no free card,please make one!*nn); printf(nntPress any key to returnnn); getchar(); 流程:輸入姓名 兩次密碼確定值相同之后 存入一定金額就可以使用信用卡了.取款void fetch(struct user u) float money; /*money要取的數(shù)目*/ int i,j=0; /*j記錄同名的人數(shù) */ int logic=0,account=0; /*logic記錄是否在文件中找到使用者信息 accout記錄輸入密碼次數(shù) 上限為3次*/ int n
13、um10; /*記錄同名的人在文件中的位置即條數(shù) */ char a20,b6; printf(nnttPlease input your name:); scanf(%s,a); for(i=0;i1) printf(nnEnter the AD number of the card:(tt )bbbbbbbbbbbbbbbbbbbb); scanf(%s,a); for(i=0;iunumj-1.left) printf(nnt Balance Difficiency!); while(moneyunumj-1.left); break; else printf(nntt* Mistake
14、n code-Try again*nn); account+; while(account3); if(account3) unumj-1.left-=money; H=1; printf(nntt* Fetch Successful* nn); else printf(nntt*Fetch failue *nnn); printf(nntPass any key to returnnn); getchar(); .存款void deposit(struct user u) /*存儲(chǔ) 定義變量意義基本與取款函數(shù)相同*/ float money; int i,j=0; int logic=0,a
15、ccount=0; int num10; char a20,b6; printf(nnPlease enter your name:); scanf(%s,a); for(i=0;i1) printf(nnEnter the AD number of the card:(tt )bbbbbbbbbbbbbbbbbbbb); scanf(%s,a); for(i=0;ij;i+) if(strcmp(unumi.adnum,a)=0) logic=1; numj-1=numi; break; if(logic=0) printf(nntt* The record does not exist.*
16、nnn); if(j=1|logic=1) do printf(nnEnter the code :( )bbbbbbb); scanf(%s,b); if(strcmp(unumj-1.code ,b)=0) printf(nnHow much do you want to deposit:); scanf(%f,&money); unumj-1.left+=money; H=1; printf(nntt* Successfully deposit !*nn); break; else printf(nntt* Mistaken code-Try again*nn); account+; w
17、hile(accountN/8+1) printf(nntt* Error page you enter-Try again *); continue; else printf(nttttPage (%d )n,page); printf(nn|); printf(n|NO. | name | AD |flag| left | exp |); printf(n|); for(i=8*(1)+1;iN/7+1); printf(nntPass any key to returnn); getchar();.消費(fèi) void consume(struct user u) /*消費(fèi) 變量意義同取款函數(shù)
18、*/ float money; int i,j=0; int logic=0,account=0; int num10; char a20,b6; printf(nnPlease enter your name:); scanf(%s,a); for(i=0;i1) printf(nnPlease enter the AD number of the card:(tt )bbbbbbbbbbbbbbbbbbbb); scanf(%s,a); for(i=0;iunumj-1.left) printf(nnt Balance Difficiency!); while(moneyunumj-1.l
19、eft); unumj-1.left-=money; unumj-1.exp+=money; H=1; printf(nnntt* Pay for successful *nn); break; else printf(nntt* Mistaken code-Try again*nn); account+; while(account3); if(account=3) printf(nntt* Failue Consume *nnn); printf(nntPress any key to returnnn); getchar(); (7).改密碼:void change(struct use
20、r u) /*修改 定義變量意義同取款函數(shù)*/ int i,j=0; int logic=0,account=0; int num10; char a20,b6; printf(nnEnter your name:); scanf(%s,a); for(i=0;i1) printf(nnPlease enter the AD number of the card:(tt )bbbbbbbbbbbbbbbbbbbb); scanf(%s,a); for(i=0;ij;i+) if(strcmp(unumi.adnum,a)=0) logic=1; numj-1=numi; break; if(l
21、ogic=0) printf(nntt* The record does not exist.*nnn); if(j=1|logic=1) do printf(nntt1.Please enter the old code :( )bbbbbbb); scanf(%s,b); if(strcmp(unumj-1.code ,b)=0) printf(nntt2.Enter the new code :( )bbbbbbb); scanf(%s,b); strcpy(unumj-1.code,b); printf(nntt* The code has been changed ,dont for
22、get the new one! *nn ); H=1; break; else printf(nntt* Mistaken code-Try again*nn); account+; while(account3); if(account=3) printf(nntt* Code unsuccessfully changed*n); printf(nntPass any key to returnnn); getchar(); (8).查找消費(fèi)記錄:int search(struct user u) int i,j=0; int logic=0,account=0; int num10; c
23、har a20,b6; printf(nnPlease enter your name:); scanf(%s,a); for(i=0;i1) printf(nnEnter the AD number of the card:(tt )bbbbbbbbbbbbbbbbbbbb); scanf(%s,a); for(i=0;ij;i+) if(strcmp(unumi.adnum,a)=0) logic=1; numj-1=numi; break; if(logic=0) printf(nntt* The record does not exist.*nnn); if(j=1|logic=1)
24、do printf(nnPlease enter the code :( )bbbbbbb); scanf(%s,b); if(strcmp(unumj-1.code ,b)=0) printf(nn The record is:); printf(nn|); printf(n|NO. | name | AD | account | integral |); printf(n|); printf(n|%-4d|%-20s|%-20s|%-10.2f|%-10d|,unumj-1.cardNO,, unumj-1.adnum,unumj-1.left,unumj-1.ex
25、p); printf(n|); printf(nnttPress any key to continuenn); getchar(); return numj-1; else printf(nntt* Mistaken code-Try again*nn); account+; while(account3); else printf(nntt* Failue Search *nnn); printf(nntPass any key to returnnn); getchar(); return -1; (9).退出:void quit() char chose; if(H=1) printf
26、(nnIf you want to save the change? y or n :( )bb); chose=getchar(); printf(%c,chose); getchar(); if(chose=y) save(u); printf(nnnnntt*Thank you!*n); exit(0); if(H=0|chose=n) printf(nnnnntt*bye bye!*n);其中.文件存儲(chǔ):void save(struct user u) FILE *fp2; int i; printf(t* Saving file*n); printf( ); if(fp2=fopen(c:/score.txt,w)=NULL) printf(Can not open the filen); exit(0); for(i=0;iN;i+) fprintf(fp2,%d %s %s %s %f %d %dn,&uN.cardNO,uN.name,uN.adnum,uN.code,&uN.left,&uN.exp,&uN.flag); fclose(fp2); printf(t* Saving success ! *n); H=0; (10).主程序:main() printf(t * welcome! *n);printf(nnntt press Enter
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 征地合同協(xié)議書
- 汽車檢測(cè)與維修作業(yè)指導(dǎo)書
- 小區(qū)物業(yè)場(chǎng)地租賃合同
- 臨時(shí)活動(dòng)場(chǎng)地租賃合同
- 中國(guó)民用航空運(yùn)輸合同書5篇
- 廣西國(guó)匯投資擔(dān)保有限公司借款擔(dān)保合同8篇
- 公路貨物運(yùn)輸合同協(xié)議
- 農(nóng)業(yè)機(jī)械化裝備應(yīng)用作業(yè)指導(dǎo)書
- 公民之間借款合同書8篇
- 2025年海口經(jīng)營(yíng)性道路客貨運(yùn)輸駕駛員從業(yè)資格考試
- 2024年福建福州地鐵集團(tuán)招聘筆試參考題庫(kù)含答案解析
- 綠色施工環(huán)境保護(hù)應(yīng)急預(yù)案
- 2023靜脈治療護(hù)理技術(shù)操作標(biāo)準(zhǔn)解讀
- 基礎(chǔ)日語1學(xué)習(xí)通超星課后章節(jié)答案期末考試題庫(kù)2023年
- 客源國(guó)概況-韓國(guó)課件
- 船塢的施工方法與流程
- 保密風(fēng)險(xiǎn)評(píng)估報(bào)告
- 道路建筑材料電子教案(全)
- 《尹定邦設(shè)計(jì)學(xué)概論》試題及答案
- 黃河流域生態(tài)保護(hù)和高質(zhì)量發(fā)展知識(shí)競(jìng)賽試題及答案(共52題)
- 1、1~36號(hào)元素電子排布式、排布圖
評(píng)論
0/150
提交評(píng)論