ImageVerifierCode 换一换
格式:DOCX , 页数:19 ,大小:576.57KB ,
资源ID:7779662      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-7779662.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(C++银行管理系统方案文档格式.docx)为本站会员(b****4)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

C++银行管理系统方案文档格式.docx

1、 采用文件的重新写入来实现存取款。四、程序的一些设计的技巧以及注意情况:为了使程序模块化,我们要采用多文件的开发。也就是说,为了使程序简练,把一些需要重复利用的代码写到.h 的文件里面。五、代码实现:#include stdafx.h#include mapstacksstreamstdio.hwindows.hstdlib.hfstreamvectoralgorithmWelcome_UI.hRegister_UI.hSign_UI.hSecondary_UI.husing namespace std;class Bank_Managementprivate: string new_name

2、; string pre_name; int password; double extra_money;public: void creat_user(string name, int pass); int sign_user(string name, int pass); double account_balance(); void withdraw_money(); void query_account(); void change_password();Bank_Management operation1024;ofstream Rec_history(Historical record

3、s.txt, ios:in | ios:out | ios:app);int main_ui() printf(nn);tt %cWelcome to use Bank Management System!%cn, 3, 3);ttt %cCopyright by SunYu_peng!, 4, 4);ttt%c+ + + + + + + + + + + + + + + +%cnttt+ Here is the system menu! +nttt+ +nttt+ 1.Deposit money +nttt+ 2.Withdraw money +nttt+ 3.Query balance +n

4、ttt+ 4.Historical records +nttt+ 5.Change password +nttt+ 6.Save and exit +ntt Please enter the order that you want: int order; cin order; if (order = 1) system(cls operation0.account_balance(); else if (order = 2) operation0.withdraw_money(); else if (order = 3) operation0.query_account(); else if

5、(order = 4) printf(nnnn Secondary_ui();tAll dates have been saved in the file(Historical records.txt) Sleep(5000); else if (order = 5) operation0.change_password(); else if (order = 6) Rec_history The user decided to exit the system!n; return 0; elseThe user has done a wrong operation!The system exi

6、ted!void Bank_Management:creat_user(string name, int pass) new_name = name; password = pass;int Bank_Management:sign_user(string name, int pass) ifstream OpenFile(User name and password.txt string get_name; int get_pass; stack sign; stringstream n; string pass_str; n pass_str; while (OpenFile get_na

7、me get_pass) stringstream temp; string temp_str; temp temp_str; string all_str = get_name + + temp_str; sign.push(all_str); while (sign.size() != 0) if (name + + pass_str = sign.top() pre_name = name; Rec_history The user : name has landed in the System. return true; else sign.pop(); OpenFile.close(

8、);double Bank_Management:account_balance() Secondary_ui();tt Please enter the money that you want ot deposit: double _money; _money; ifstream Deposit_money(Account balance.txt map Deposit_Money; :iterator it; string temp; while (Deposit_money temp extra_money) if (temp = pre_name) extra_money = extr

9、a_money + _money; temp has deposited _money Yuann Deposit_Money.insert(pair(temp, extra_money); Deposit_money.close(); ofstream DepositMoney( for (it = Deposit_Money.begin(); it != Deposit_Money.end(); it+) DepositMoney first tsecond extra_money = extra_money - _money;Rec_history User :has withdrawe

10、d Withdraw_Money.insert(pair Withdraw_money.close(); ofstream WithdrawMoney( for (it = Withdraw_Money.begin();= Withdraw_Money.end(); WithdrawMoney WithdrawMoney.close();query_account() ifstream Read_only( double extra; cout extra) cout extra endl; Read_only.close(); Rec_history change_password;ttPl

11、ease enter the new password you want: double new_pass; new_pass; pass) pass = new_pass; change_password.insert(pair(temp, pass); ofstream res_pass( for (it = change_password.begin();= change_password.end(); res_pass The user pre_name if (order = 1) printf(tt Please enter the previous users name: cin

12、 name;tt Please enter previous users password: password; if (operation0.sign_user(name, password) = 1) system( main_ui( ); else printf(tSorry,you have done a wrong operation!Please restart the system again! an Rec_history The user whose name is has failed to enter the system.n Sleep(1000); else if (

13、order = 2) system( register_ui(); ofstream Cre_user; Cre_user.open( ofstream Ini_account; Ini_account.open(tt Please enter the users quantity you want : creat_num; for (int i = 0; itt Please enter the %d-user Cre_user password Ini_account 0 The system has created a user whose name is The system has initialized s accountn Cre_user.close(); Ini_account.close();tWe have saved all operations! Sleep(1000); else if (order = 3) return 0;

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

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