account.cpp

来自「一个模仿ATM提款机的MFC程序」· C++ 代码 · 共 70 行

CPP
70
字号
// Account.cpp: implementation of the Account class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "ATM.h"
#include "Account.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////



void Account::reloadbalance(double b)
{
	balance=b;
}


Account::Account(CString accNo,CString paswrd,bool location,bool bank)
{

	acntNumber=accNo;
	password=paswrd;
	this->location=location;
	this->bank=bank;
	
}

Account::~Account()
{
}
CString Account::GetacntNo()
{
	return acntNumber;
}

void Account::changePassword(CString Password)
{
	this->password=Password;
}
bool Account::checkPassword(CString Paswod)
{
	if(this->password==Paswod)
		return true;
	else 
		return false;
}

void Account::loadFile(ostream & out)
{
	out <<acntNumber<<' '<<password<<' '<<balance<<' ';
}

ostream& operator <<(ostream & out ,Account &Ac)
{
	Ac.loadFile(out);
	out << endl;
	return out;
}


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?