saving-account

所属分类:Windows编程
开发工具:Visual C++
文件大小:1KB
下载次数:5
上传日期:2013-05-12 08:29:17
上 传 者jmrzzw
说明:  创建SavingsAccountclass。使用StaticData部分成员存储theannualInterestRateto店每年提取的每个储户的利率。每个类的成员包含privatedata的的成员savingsBalanceindicating金丹目前有存款量。提供一个成员函数calculateMonthlyInterestmember的功能,计算由乘以12 balancebyannualInterestRatedivided的月息 ,这种兴趣应加savingsBalance的。提供一个staticmember功能modifyInterestRatethat的的设置静态annualInterestRateto的一个新值。写类SavingsAccount的adriver程序测试。实例化两个不同的对象类SavingsAccount,saver1and saver2的结余为$2000.00和3000.00美元的,分别。设置annualInterestRateto3percent,然后计算出每月利息,并为每个储户打印新的结余。然后设置theannualInterestRateto4%,计算出下个月的利息和eachof运算储户打印新的结余。
(H12 H12 Create a SavingsAccountclass. Use a staticdata member to store theannualInterestRateto store theannual interest rate for each of the savers. Each member of the class contains a privatedata member savingsBalanceindicating the amount the saver currently has on deposit. Provide a member function calculateMonthlyInterestmember function that calculates the monthly interest by multiplying the balancebyannualInterestRatedivided by 12 this interest should be added to savingsBalance. Provide a staticmember function modifyInterestRatethat sets the static annualInterestRateto a new value. Write adriver program to test class SavingsAccount. Instantiate two different objects of class SavingsAccount,saver1and saver2, with balances of $2000.00 and $3000.00, respectively. Set annualInterestRateto 3percent, then calculate the monthly interest and print the new balances for each of the savers. Then set theannualInterestRateto 4 percent, calculate the next month’s interest and print the new ba)

文件列表:
saving account (0, 2013-04-21)
saving account\main.cpp (622, 2013-04-17)
saving account\SavingAccount.cpp (394, 2013-04-17)
saving account\SavingAccount.h (263, 2013-04-17)

近期下载者

相关文件


收藏者