文件名称:ex5_1
- 所属分类:
- Windows编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 554kb
- 下载次数:
- 0次
- 提 供 者:
- tan****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
1,设计一个类SavingsAccount,定义一个静态数据成员记录存款的年利率(rate),该类的每个成员都包含一个私有的数据成员balance,表示该成员当前的存款数额。提供一个成员函数CalMonthlyInterest(),用以计算月利息(用balance乘以rate再除以12),并将这个月利息加入balance中。提供一个静态成员函数ModifyRate(),用以改变静态数据成员rate的值。定义两个不同的SavingsAccount对象saver1和saver2,当前存款数额balance分别为2000.00和3000.00。首先将rate设置为3 ,计算每个存款人的月息并打印新的结果,然后将rate设置为4 ,再次计算每个存款人的月息并打印新的结果。-1, the design of a class SavingsAccount, define a static data member records of deposits interest rate (rate), each member of the class contains a private data member balance, said the members of the current deposit amount. A member function CalMonthlyInterest (), to calculate the monthly interest (rate multiplied with the balance divided by 12), and this month joined the balance of interest. Provide a static member function ModifyRate (), used to change the value of the static data member rate. SavingsAccount define two different objects saver1 and saver2, the current deposit balance amount of 2000.00 and 3000.00, respectively. First, the rate is set to 3 monthly interest rate calculated for each depositor and print new results, and then rate is set to 4 , re-calculate the monthly interest of each depositor and print new results.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ex5_1\Debug\ex5_1.exe
.....\.....\ex5_1.ilk
.....\.....\ex5_1.obj
.....\.....\ex5_1.pch
.....\.....\ex5_1.pdb
.....\.....\StdAfx.obj
.....\.....\vc60.idb
.....\.....\vc60.pdb
.....\ex5_1.cpp
.....\ex5_1.dsp
.....\ex5_1.dsw
.....\ex5_1.ncb
.....\ex5_1.opt
.....\ex5_1.plg
.....\ReadMe.txt
.....\StdAfx.cpp
.....\StdAfx.h
.....\Debug
ex5_1
.....\.....\ex5_1.ilk
.....\.....\ex5_1.obj
.....\.....\ex5_1.pch
.....\.....\ex5_1.pdb
.....\.....\StdAfx.obj
.....\.....\vc60.idb
.....\.....\vc60.pdb
.....\ex5_1.cpp
.....\ex5_1.dsp
.....\ex5_1.dsw
.....\ex5_1.ncb
.....\ex5_1.opt
.....\ex5_1.plg
.....\ReadMe.txt
.....\StdAfx.cpp
.....\StdAfx.h
.....\Debug
ex5_1