文件名称:4-4
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:906byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
设计一个银行账户(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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.