c++银行管理系统实验报告Word文档下载推荐.docx

上传人:wj 文档编号:345342 上传时间:2023-04-28 格式:DOCX 页数:28 大小:19.51KB
下载 相关 举报
c++银行管理系统实验报告Word文档下载推荐.docx_第1页
第1页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第2页
第2页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第3页
第3页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第4页
第4页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第5页
第5页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第6页
第6页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第7页
第7页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第8页
第8页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第9页
第9页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第10页
第10页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第11页
第11页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第12页
第12页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第13页
第13页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第14页
第14页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第15页
第15页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第16页
第16页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第17页
第17页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第18页
第18页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第19页
第19页 / 共28页
c++银行管理系统实验报告Word文档下载推荐.docx_第20页
第20页 / 共28页
亲,该文档总共28页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

c++银行管理系统实验报告Word文档下载推荐.docx

《c++银行管理系统实验报告Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《c++银行管理系统实验报告Word文档下载推荐.docx(28页珍藏版)》请在冰点文库上搜索。

c++银行管理系统实验报告Word文档下载推荐.docx

4、消户,管理员输入用户帐号,密码,显示用户信息,确认后进行操作。

(二)用户模式

1、存款,用户输入帐号,密码,存款金额进行操作。

2、取款,同上。

3、查询,输入密码。

4、转账,输入本人密码,对方账号,转账金额进行此操作。

5、更改密码,输入原密码,再输入新密码,然后确认新密码。

三、课程设计工作计划

1、确定题目,成立设计小组,做用户需求分析

2、查阅资料,进行问题分析,制定方案,确定成员分工

3、根据方案编写程序并进行调试

4、撰写设计说明书,完成设计

5、提交设计内容,答辩

四、相关教材及参考书目

1、谭浩强.C++语言基础课程.清华大学出版社,2009

2、郑莉.C++语言程序设计案例教程.清华大学出版社,2005

3、王瑞等.VisualC++数据库系统开发完全手册.人民邮电出版社,2006

4、郑莉.C++语言程序设计习题与实验指导.清华大学出版社,2007

5、张基温.C++程序设计基础例题与习题.高等教育出版社,2008

6、于永彦.C++程序设计基础案例教程.北京大学出版社,2009

7、

五、系统模块

本系统包括管理员模式其中包括:

开户、挂失、取消挂失、消户功能;

用户模式其中包括:

存款、取款、查询、转账、更改密码功能,如图1所示

用户模式

管理员模式

银行账户管理系统

更改密码

转账

查询

取款

存款

消户

个人信息

登入

开户

图1银行账户管理系统模块

1、管理员模式:

此模式用于银行管理员为用户开户使用户获取账号,凭用户获取的账号银行管理员可为用户提供挂失,解除挂失销户的服务。

2、用户模式:

此模式用于用户在银行中存款,取款,查询自己在银行账户中的余额,还提供转账功能,为用户带来便利,修改密码使用户可以随时更改自己账户的密码,使得账户安全。

6、程序设计分析

李世生负责的模块:

#include<

iostream>

#include<

string>

#include<

stdlib.h>

fstream>

conio.h>

intcode();

//登录密码usingnamespacestd;

classconsumer;

classYH

{

public:

YH();

voidset_account();

//银行开户

voiddel_account();

voidtransfer(int);

//转账voidenter_account();

voidaddmoney(int,float);

voidexitYH();

//退出系统

voidfunctionshow();

voidsave();

voidload();

//功能界面

protected:

consumer*account[20];

static intacnum;

//账户数

};

//登录密码intcode()

inti=0,j=0;

intc;

charname[15],cod[15];

cout<

<

"

\n\n"

;

while(j<

3)

cout<

\t\t管理员:

cin.getline(name,sizeof(name));

//用cin不包括空格符;

endl<

\t\t输入密码:

j++;

c=getch();

while(c!

='

\r'

)//回车

if(i>

=0)

if(c=='

\b'

\b\b"

i=i-1;

}

else

*"

cod[i]=c;

c=getch();

if(c!

i=i+1;

cod[i]='

\0'

\t\t"

if((strcmp(name,"

6539"

)==0)&

&

(strcmp(cod,"

li"

)==0)

||(strcmp(name,"

2"

222"

)==0))

登陆成功!

j=4;

break;

***"

)!

=0)||(strcmp(name,"

***"

=0))

登陆失败!

密码错误!

elsecout<

管理员不存在!

returnj;

intYH:

:

acnum=0;

YH:

YH()

for(inti=0;

i<

20;

i++)

account[i]=NULL;

classconsumer:

publicYH

friendclassYH;

consumer(intid,stringName,stringPassWord,floatm)

ID=id;

name=Name;

money=m;

passwd=PassWord;

consumer()

{ID=0;

name='

0'

money=0;

passwd='

intget_id(){returnID;

}voidsavemoney();

//存钱

stringget_passwd()

{returnpasswd;

//取得密码

voiddisplay();

voidfetchmoney();

//取钱voidchange_passwd();

voidadd_money(float);

voiddec_money(float);

floatget_money();

//卡卡转帐private:

intID;

//开户帐号

stringpasswd;

//用户密码stringname;

//用户姓名floatmoney;

voidYH:

save()

{ofstreamofile("

bankdat.txt"

ios:

out);

ofstreamoutfile("

intn=0;

outfile<

acnum<

"

for(;

n<

acnum;

n++)

{outfile<

account[n]->

ID<

outfile<

money<

"

name<

passwd<

outfile.close();

//page_break

load()

{ifstreaminfile("

in);

if(!

infile)

{cerr<

读取错误,无资料中!

endl;

return;

intn=0;

intid,m;

stringnam,passw;

infile>

>

{infile>

id;

m;

nam;

passw;

account[n]->

passwd;

consumer*acc=newconsumer(id,nam,passw,m);

account[n]=acc;

infile.close();

读取资料正常!

周刊负责的模块:

transfer(intx)

{intid;

请输入帐号:

cin>

intflag=1;

inti=0;

while((i<

acnum)&

(flag))

if(id==account[i]->

get_id())flag=0;

else i++;

if(flag)

帐号不存在!

return;

floatb;

请输入你要转帐的金额:

b;

while(b<

=0)

请输入正确的数字!

$>

cin>

if(account[x]->

get_money()<

b)cout<

对不起,金额不够!

!

else{account[x]->

dec_money(b);

account[i]->

add_money(b);

转帐成功!

voidconsumer:

add_money(floatx)

{money=x+money;

dec_money(floatx)

money=money-x;

addmoney(intx,floaty)

{account[x]->

money=account[x]->

money-y;

floatconsumer:

get_money()

returnmoney;

intmain()

system("

color70"

);

inti=0;

\t【】\t〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓

〓〓〓 【】"

for(i=0;

3;

\t【】\t◎\t\t\t\t\t\t◎ 【】"

\t【】\t◎◎◎Oo【 欢迎进入银行账户管理系统

】oO◎◎◎ 【】"

\t【】\t◎\t\t\t\t\t\t◎ 【】"

\t【】\t〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓

〓〓〓〓〓 【】"

\t【】\t\t\t\t\t\t\t 【】"

\t【】┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

┅┅┅┅┅【】"

if(code()!

=4)

\t\t输入次数已到!

\n"

return0;

getch();

YHyh;

yh.functionshow();

return0;

functionshow()

intn;

do

{system("

cls"

load();

\t\t〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓

〓〓"

\t\t\t\t1) 用户开户"

\t\t\t\t2) 账户登陆

\t\t\t\t3) 帐户注销"

\t\t\t\t4) 退出系统

〓〓\n"

请你输入相应的操作序号进行操作:

n;

while(n<

1||n>

4)

请输入正确的操作序号!

$>

switch(n)

case1:

set_account();

case2:

enter_account();

case3:

del_account();

case4:

exitYH();

cin.get();

while(true);

enter_account()

intid;

while((i<

请输入密码:

stringpassw;

if(passw!

=account[i]->

get_passwd())return;

account[i]->

display();

cin.get();

intn;

do{system("

\t\t\t\t1)查看信息"

\t\t\t\t2)取款

\t\t\t\t3)存款"

endl

\t\t\t\t4)修改密码"

\t\t\t\t5)转账

\t\t\t\t6)返回"

请选择你要进行的操作:

while(n<

6)

谢谢"

{case1:

case2:

fetchmoney();

save();

savemoney();

case4:

change_passwd();

case5:

transfer(i);

case6:

while

(1);

set_account()

stringnam;

floatm;

请输入开户号:

请输入开户人姓名:

请输入开户密码:

请输入存入金额:

while(m<

account[acnum]=acc;

开户成功!

acnum++;

save();

return;

}

胡楠松负责的模块:

del_account()

请输入你要注销的帐户号:

if(id==account[i]->

get_id())

flag=0;

{i++;

for(intj=i;

j<

j++)

account[j]=account[j+1];

account[acnum-1]=NULL;

acnum--;

注销成功!

change_passwd()

stringpwd,repwd;

请输入新密码:

pwd;

请再输入一次新密码:

repwd;

if(pwd!

=repwd)

你输入的两次密码不一样,请重新输入!

passwd=pwd;

密码修改成功,请牢记!

fetchmoney()

floatm;

charch;

do{

你要取多少钱:

endl;

//page_break

if(money<

m)

对不起,你的余额不足!

}else

{money=money-m;

操作成功,请收好钱!

是否要继续该项操作:

(Y/N)"

ch;

while(ch!

='

n'

ch!

N'

Y'

y'

}while(ch=='

||ch=='

}voidconsumer:

savemoney()

floatc;

do

你要存多少钱:

c;

while(c<

money=money+c;

操作已成功!

=

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高中教育 > 初中教育

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2