【文件属性】:
文件名称:银行ATM C++代码
文件大小:4KB
文件格式:TXT
更新时间:2015-11-05 09:53:18
atm
#include
#include
using namespace std;
class Consumer
{
private:
long Accnumber;
string conname;
double Balance;
long password;
public:
Consumer();
void login();
int Query();
int transfer();
int withdraw();
int update();//修改密码
void choose();
};
Consumer::Consumer()
{
Accnumber=1030070128;
conname="林杰东";
Balance=10000.00;
password=123456;
}
void Consumer::login()
{
long password0;
int i=0;
cout<<"**********欢迎登入林杰东银行**********"<>password0;
i++;
if(password0!=password)
{
cout<<"对不起,您的输入有误,请重新输入!!!"<>Accnumber1;
if(Accnumber1==Accnumber)
{
cout<<"对不起,您要转入的账号是当前银行卡的账号,无法转账!!!请重新输入其他账号!!!"<>Accnumber2;
if(Accnumber1==Accnumber2 )
{
cout<<"请输入您要转账的金额:";
cin>>money;
cout<=money)
{
Balance=Balance-money;
cout<<"转账成功!!!"<>password1;
if(password1!=password)
{
cout<<"对不起,您的输入有误,请重新输入!!!"<>password2;
cout<<"请重新输入您的6位新密码:";
cin>>password3;
if(password2==password3)
{
password=password3;
cout<<"恭喜您,您的密码修改成功!!!"<>number;
if(Balance>choice;
switch(choice)
{
case 1:
cout<