文件名称:ex5_1
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:554.17kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
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/Debug/ex5_1.ilk
ex5_1/Debug/ex5_1.obj
ex5_1/Debug/ex5_1.pch
ex5_1/Debug/ex5_1.pdb
ex5_1/Debug/StdAfx.obj
ex5_1/Debug/vc60.idb
ex5_1/Debug/vc60.pdb
ex5_1/ex5_1.cpp
ex5_1/ex5_1.dsp
ex5_1/ex5_1.dsw
ex5_1/ex5_1.ncb
ex5_1/ex5_1.opt
ex5_1/ex5_1.plg
ex5_1/ReadMe.txt
ex5_1/StdAfx.cpp
ex5_1/StdAfx.h
ex5_1/Debug
ex5_1
ex5_1/Debug/ex5_1.ilk
ex5_1/Debug/ex5_1.obj
ex5_1/Debug/ex5_1.pch
ex5_1/Debug/ex5_1.pdb
ex5_1/Debug/StdAfx.obj
ex5_1/Debug/vc60.idb
ex5_1/Debug/vc60.pdb
ex5_1/ex5_1.cpp
ex5_1/ex5_1.dsp
ex5_1/ex5_1.dsw
ex5_1/ex5_1.ncb
ex5_1/ex5_1.opt
ex5_1/ex5_1.plg
ex5_1/ReadMe.txt
ex5_1/StdAfx.cpp
ex5_1/StdAfx.h
ex5_1/Debug
ex5_1
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.