下载此文档

银行帐户管理程序(功能完善版).doc


文档分类:办公文档 | 页数:约16页 举报非法文档有奖
1/16
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/16 下载此文档
文档列表 文档介绍
//:定义控制台应用程序的入口点。//#include""#include<iostream>#include<string>#include<fstream>#include<>#include<>#include<>#include<>usingnamespacestd;classconsumer;classYH//银行类{public:ount();//ount();//注销账户功能voidtransfer(int);//ount();//进入用户个人信息功能voidaddmoney(int,float);//存款功能voidexitYH();//退出系统voidfunctionshow();voidsave();voidload();//功能界面consumer*account[1000];um;//账户数 };classconsumer:publicYH//用户类,继承银行类的属性{public:friendclassYH;consumer(intid,stringName,stringPassWord,floatm,intidcard,intphone,intcunqian, chartmp[100],intquqian,chartmp1[100],intzhuanzhang,chartmp2[100]){ID=id;name=Name;money=m;passwd=PassWord;idc=idcard;pho=phone; cq=cunqian; qq=quqian; zz=zhuanzhang; strcpy_s(TMP,tmp); strcpy_s(TMP1,tmp); strcpy_s(TMP2,tmp); } consumer() {ID=0;name='0';money=0;passwd='0';idc=0;pho=0;cq=0;strcpy_s(TMP,"0");qq=0;strcpy_s(TMP1,"0");zz=0;strcpy_s(TMP2,"0");}//构造函数初始化intget_id() {returnID;} intget_idcard() {returnidc;} intget_phone() {returnpho;}voidsavemoney();//存钱stringget_passwd(){returnpasswd;}//取得密码voiddisplay();//个人信息界面 voiddisplay1();//查询记录界面 voiddisplay2(); voiddisplay3(); voiddisplay4();voidfetchmoney();//取钱voidchange_passwd();voidadd_money(float);voiddec_money(float);floatget_money();//卡卡转帐 private:intID;//开户帐号stringpasswd;//用户密码stringname;//用户姓名floatmoney;//开户金额 intidc; intpho; charTMP[100],TMP1[100],TMP2[100]; intcq,qq,zz;};voidYH::save(){ofstreamofile("",ios::out);ofstreamoutfile("",ios::out);intn=0;outfile<<acnum<<"";for(n=0;n<acnum;n++){outfile<<account[n]->ID<<""<<endl;outfile<<account[n]->money<<""<<endl;outfile<<account[n]->name<<""<<endl;outfile<<account[n]->passwd<<""<<endl;outfile<<account[n]->idc<<""<<endl;outfile<<account[n]->pho<<""<<endl;outfile<<account[n]->cq<<""<<endl;outfile<<account[n]->qq<<""<<endl;outfile<<account[n]->zz<<""<<endl;outfile<<account[n]->TMP<<""<<endl;outfile<<account[n]->TMP1<<""<<endl;outfile<<account[n]->TMP2<<""<<endl;}();}/*读入用户信息功能实现*/voidYH::load(){ifstreaminfile("",ios::in);if(!infile){cerr<<"读取错误,无资料中!"<<endl;return;}intn=0;

银行帐户管理程序(功能完善版) 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息