文件名称:4-4
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
设计一个银行账户(Account)类,包含户名、帐号以及当前余额属性,可完成开户、存款、取款和查询余额等行为。银行账户类的定义如下:
class Account
{
private:
char mName[20] //银行账户的户名
long mSN //本账户的帐号
float mBalance //本账户当前的余额
public:
Account(char name[],long num,float amount) //类的构造函数
~Account() //类的析构函数
void deposit(float amount) //往账户中存款
int withdraw(float amount) //从账户中取款
float getBalance() //查询余额
}
请根据上述给定的类,完善其相应的成员函数的定义,并编写主函数实现测试。
-Design a bank account (Account) class that contains the user name, account number and the current balance of properties, to be completed account opening, deposits, withdrawals and balance inquiries and other acts. Bank account class is defined as follows: class Account {private: char mName [20] // bank account username long mSN // account of this account is float mBalance // The current account balance public: Account (char name [], long num, float amount) // class constructor ~ Account () // class destructor void deposit (float amount) // to account deposit int withdraw (float amount) // withdrawals from the account float getBalance () // check balances } according to the given class, and improve the corresponding member function definitions, and the preparation of the main functions for testing.
class Account
{
private:
char mName[20] //银行账户的户名
long mSN //本账户的帐号
float mBalance //本账户当前的余额
public:
Account(char name[],long num,float amount) //类的构造函数
~Account() //类的析构函数
void deposit(float amount) //往账户中存款
int withdraw(float amount) //从账户中取款
float getBalance() //查询余额
}
请根据上述给定的类,完善其相应的成员函数的定义,并编写主函数实现测试。
-Design a bank account (Account) class that contains the user name, account number and the current balance of properties, to be completed account opening, deposits, withdrawals and balance inquiries and other acts. Bank account class is defined as follows: class Account {private: char mName [20] // bank account username long mSN // account of this account is float mBalance // The current account balance public: Account (char name [], long num, float amount) // class constructor ~ Account () // class destructor void deposit (float amount) // to account deposit int withdraw (float amount) // withdrawals from the account float getBalance () // check balances } according to the given class, and improve the corresponding member function definitions, and the preparation of the main functions for testing.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
4-4.cpp