-
大小: 574KB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2021-06-08
- 語(yǔ)言: C/C++
- 標(biāo)簽: C++??ATM取款機(jī)??系統(tǒng)設(shè)計(jì)??C++大作業(yè)??
資源簡(jiǎn)介
基于C++的ATM機(jī)操作系統(tǒng)設(shè)計(jì), 可進(jìn)行建立新賬戶、存款、取款、改密、查詢等ATM機(jī)操作

代碼片段和文件信息
#include
#include
#include“bank_account.h“
using?namespace?std;
void?Date::setdate()
{?cout<<“請(qǐng)輸入年份:“;
cin>>year;
cout<<“請(qǐng)輸入月份:“;
cin>>month;
cout<<“請(qǐng)輸入天序:“;
cin>>day;
}
void?b_acct::setowner()
{???mydate.setdate();
cout<<“請(qǐng)輸入新賬戶姓名:“;
cin>>owner;
}
void?b_acct::setaddress()
{
cout<<“請(qǐng)輸入地址:“;
cin>>address;
}
void?b_acct::setaccount_number(long?x)
{
account_number=x;
}
void?b_acct::setcode()
{
long?temp=-1;
while(temp!=code)
{
cout<<“請(qǐng)?jiān)O(shè)置密碼:“;
cin>>code;
cout<<“請(qǐng)?jiān)俅屋斎朊艽a:“;
cin>>temp;
if(temp!=code)
cout<<“前后密碼不一致,請(qǐng)重新設(shè)置“< }
cout<<“密碼設(shè)置成功,請(qǐng)繼續(xù)操作“< }
void?b_acct::setbalance(double?x)
{
balance=x;
}
string?b_acct::getowner()
{
return(owner);
}
string?b_acct::getaddress()
{
return(address);
}
int?b_acct::getaccount_number()
{
return(account_number);
}
long?b_acct::getcode()
{
return(code);
}
double?b_acct::getbalance()
{
return(balance);
}
long?Date::getyear()
{
return(year);
}
int?Date::getmonth()
{
return(month);
}
int?Date::getday()
{
return(day);
}
void?b_acct::deposit()
{
int?money;
cout<<“請(qǐng)輸入存款數(shù):“;
cin>>money;
balance=balance+money;
cout<<“存入成功,你目前的存款為“< cout<<“請(qǐng)繼續(xù)操作“< }
void?b_acct::withdraw()
{
int?money;
cout<<“請(qǐng)輸入取款數(shù):“;
cin>>money;
if(balance>=money)
{
balance=balance-money;
cout<<“取款成功,你目前的存款為“< }
else
cout<<“余額不足!“< cout<<“請(qǐng)繼續(xù)操作“< }
void?b_acct::check_account()
{
cout<<“賬號(hào):“< cout<<“姓名:“< cout<<“地址:“< cout<<“余額:“< cout<<“年份:“< cout<<“月份:“< cout<<“天序:“< cout<<“請(qǐng)繼續(xù)操作“< }
void?b_acct::correct()
{
cout<<“請(qǐng)重新輸入賬戶姓名:“;
cin>>owner;
cout<<“請(qǐng)重新輸入地址:“;
cin>>address;
cout<<“請(qǐng)重新輸入年份:“;
cin>>mydate.getyear();
cout<<“請(qǐng)重新輸入月份:“;
cin>>mydate.getmonth();
cout<<“請(qǐng)重新輸入天序:“;
cin>>mydate.getday()day;
long?temp=-1;
while(temp!=code)
{
cout<<“請(qǐng)重新設(shè)置密碼:“;
cin>>code;
cout<<“請(qǐng)?jiān)俅屋斎朊艽a:“;
cin>>temp;
if(temp!=code)
cout<<“前后密碼不一致,請(qǐng)重新設(shè)置“< }
cout< }
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????2558??2014-09-03?19:26??銀行管理\bank_account.cpp
?????文件???????1146??2009-05-11?22:23??銀行管理\bank_account.h
?????文件??????91136??2009-05-11?22:24??銀行管理\Debug\vc60.idb
?????文件?????118784??2009-05-11?22:24??銀行管理\Debug\vc60.pdb
?????文件?????581755??2009-05-06?23:52??銀行管理\Debug\銀行管理.exe
?????文件?????843988??2009-05-06?23:52??銀行管理\Debug\銀行管理.ilk
?????文件?????186996??2009-05-06?23:06??銀行管理\Debug\銀行管理.pch
?????文件????1344512??2009-05-06?23:52??銀行管理\Debug\銀行管理.pdb
?????文件???????2957??2014-09-03?19:26??銀行管理\main.cpp
?????文件???????4440??2009-04-07?01:03??銀行管理\銀行管理.dsp
?????文件????????541??2009-04-17?11:07??銀行管理\銀行管理.dsw
?????文件??????58368??2009-05-11?22:24??銀行管理\銀行管理.ncb
?????文件??????53760??2009-05-11?22:24??銀行管理\銀行管理.opt
?????文件??????12768??2009-05-11?22:24??銀行管理\銀行管理.plg
?????目錄??????????0??2009-05-11?22:23??銀行管理\Debug
?????目錄??????????0??2009-05-11?22:24??銀行管理
-----------?---------??----------?-----??----
??????????????3303709????????????????????16
評(píng)論
共有 條評(píng)論