⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 protectedaccount.hpp

📁 financal instrument pricing using c
💻 HPP
字号:
// ProtectedAccount.hpp
//
// Account proxy with access control
//
// (C) Datasim Education BV 2002

#ifndef ProtectedAccount_hpp
#define ProtectedAccount_hpp

#include "RealAccount.hpp"
#include <string>

class ProtectedAccount: public Account
{
private:		
	RealAccount* account;
	bool access;

public:
	// Constructors and destructor
	ProtectedAccount();										// Default constructor
	ProtectedAccount(double balance, const std::string& password);	// Constructor with initial balance and password
	ProtectedAccount(const ProtectedAccount& source);		// Copy constructor
	virtual ~ProtectedAccount();							// Destructor

	// Virtual functions to be define in derived classes
	virtual void Withdraw(double amount);
	virtual double GetBalance();

	// Operator overloading
	ProtectedAccount& operator = (const ProtectedAccount& source);	// Assignment operator
};


#endif // ProtectedAccount_hpp

⌨️ 快捷键说明

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