13,357,973 members (56,272 online)
Rate this:
See more:
Create class CSavingsAccount.

Use a Shared class variable to store the mAnnualInterestRate for all account holders.
Each object of the class contains a Private instance variable mSavingsBalance indicating the amount the saver currently has on deposit. Provide method CalculateMonthlyInterest to calculate the monthly interest by multiplying the mSavingsBalance by AnnualInterestRate divided by 12; this interest should be added to mSavingsBalance.

Provide a Shared method ModifyInterestRate that sets the mAnnualInterestRate to a new value. Write a program to test class CSavingsAccount. Instantiate two CSavingsAccount objects, saver1 and saver2, with balances of \$2000.00 and \$3000.00, respectively.

Set CAnnualInterestRate to 4%, then calculate the monthly interest and print the new balances for each of the savers. Then set the mAnnualInterestRate to 5% and calculate the next month’s interest and print the new balances for each of the savers.

Write a program demonstrating that a method with its own Try block does not have to Catch every possible exception that occurs within the Try block. Some exceptions can slip through to, and be handled in, other scopes.
Posted 21-Sep-12 5:34am
Updated 21-Sep-12 5:59am
v3

Yes and? Your other classmates were here a couple of days ago wanting someone to do their homework for them too.
Sergey Alexandrovich Kryukov 21-Sep-12 11:35am

Great! :-)
--SA
Sergey Alexandrovich Kryukov 21-Sep-12 11:34am

And what, do you thing CCheckingAccount would be a different class? Then thing again... :-)
--SA
Marcus Kramer 21-Sep-12 11:39am

We don't do homework for you. What would you learn if we did. The point to your education is that you learn something that will make you useful in the real, working world.
See this for a great explanation why. (Compliments of JSOP)

Rate this:

## Solution 2

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

Top Experts
Last 24hrsThis month
 OriginalGriff 652 Jochen Arndt 380 ppolymorphe 200 Richard MacCutchan 184 Richard Deeming 160
 OriginalGriff 5,004 Jochen Arndt 1,776 ProgramFOX 1,348 Karthik Bangalore 1,326 CPallini 1,222