所属分类:
VC书籍
开发工具:C/C++
文件大小:14KB
下载次数:3
上传日期:2018-04-07 21:18:12
说明: a. 设计一个BankTransaction类,允许用户进行如下操作:
开户(分配一个账号,并设置余额,开户至少存入100元)、存款、取款、查询
该类还包括一个成员函数,用于自动提醒用户账户是否已经透支
b.编写测试函数,测试类是否工作:
tom开了一个银行账户 card1001,存入100元
tom存入了1000元
tom取出了800元
tom查询到当前的余额为300
tom想取500元,系统告知他,余额不足
(A. designs a BankTransaction class that allows users to perform the following operations.
Open an account (assign an account number, set the balance, deposit at least 100 yuan), deposit, withdraw money, inquire.
The class also includes a member function, which is used to automatically remind users whether the account has been overdrawn.
B. writes the test function, and the test class works:
Tom opened a bank account, card1001, which deposited 100 yuan.
Tom has been saved in 1000 yuan
Tom took out 800 yuan
Tom query to the current balance of 300
Tom wants to get 500 yuan, and the system tells him that the balance is not enough.)
文件列表:
C%2B%2B对于取款机的实现.docx, 17955 , 2018-03-24