In addition to Balance inquiry, deposit, and money collection services, the current bank ATM can also provide various services such as water payment, electricity fee, and gas fee. Use your familiarProgramming LanguageTDD and command design modes to implement the following service functions of a bank ATM:
1) Check balance)
2) Save Money (deposit)
3) withdraw money (withdraw)
4) residential electricity card purchase (assume 2 yuan per power supply) (electric Card, RMB 2 per unit)
Test Case prompt:
1) query balance: 0 RMB
2) deposit 1000 yuan, query balance: 1000 yuan
3) retrieve 300 RMB, and check the balance: 700 RMB
4) Electricity Purchase: 100 degrees, query balance: 500 yuan, electric Card new 100 degrees electricity
------------------------------------
OriginalArticleFor more information, see the source. Thank you. Address: http://blog.csdn.net/wubinben28/article/details/9886727