| | |
Bank Account Class
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2007
Posts: 5
Reputation:
Solved Threads: 0
hi everyone...I need help on solving this question...
Create a SavingAccount class. Use a static data member to contain the annualInterestRate for each of the saver.
Each member of the class contains a private data member savingsBalance indicating the amount the saver currently has on
deposit. Provide a calculateMonthlyInterest member function that calculates the monthly interest by multiplying
the balance by annualInterestRate divided by 12; this interest should be added to savingsBalance.
Provide a static member function modifyInterestRate that sets the static annualInterestRate to a new value.
Write a driver program to test class savingsAccount. Instantiate two different savingsAccount objects, saver1 and saver2,
with balances of $2000.00 and $3000.00, respectively. Set annualInterestRate to 3% then calculate the monthly interest
and print the new balances for each of the savers. Then set the annualInterestRate to 4% and calculate the
next month’s interest and print the new balances for the saver. Your out put should able to display as below:
Output monthly balances for one year at .03
Balances : Saver 1 $2000.00 Saver 2 $3000.00
Month 1: Saver 1 $2005.00 Saver 2 $3007.50
Month 2: Saver 1 $2010.01 Saver 2 $3015.02
Month 3: Saver 1 $2015.04 Saver 2 $3022.56
Month 4: Saver 1 $2020.08 Saver 2 $3030.11
Month 5: Saver 1 $2025.13 Saver 2 $3037.69
Month 6: Saver 1 $2030.19 Saver 2 $3045.28
Month 7: Saver 1 $2035.26 Saver 2 $3052.90
Month 8: Saver 1 $2040.35 Saver 2 $3060.53
Month 9: Saver 1 $2045.45 Saver 2 $3068.18
Month 10: Saver 1 $2050.57 Saver 2 $3075.85
Month 11: Saver 1 $2055.69 Saver 2 $3083.54
Month 12: Saver 1 $2060.83 Saver 2 $3091.25
After setting interest rate to .04
Balances : Saver 1 $2067.70 Saver 2 $3101.55
Urgent!any help and direction will be appreaciated
Create a SavingAccount class. Use a static data member to contain the annualInterestRate for each of the saver.
Each member of the class contains a private data member savingsBalance indicating the amount the saver currently has on
deposit. Provide a calculateMonthlyInterest member function that calculates the monthly interest by multiplying
the balance by annualInterestRate divided by 12; this interest should be added to savingsBalance.
Provide a static member function modifyInterestRate that sets the static annualInterestRate to a new value.
Write a driver program to test class savingsAccount. Instantiate two different savingsAccount objects, saver1 and saver2,
with balances of $2000.00 and $3000.00, respectively. Set annualInterestRate to 3% then calculate the monthly interest
and print the new balances for each of the savers. Then set the annualInterestRate to 4% and calculate the
next month’s interest and print the new balances for the saver. Your out put should able to display as below:
Output monthly balances for one year at .03
Balances : Saver 1 $2000.00 Saver 2 $3000.00
Month 1: Saver 1 $2005.00 Saver 2 $3007.50
Month 2: Saver 1 $2010.01 Saver 2 $3015.02
Month 3: Saver 1 $2015.04 Saver 2 $3022.56
Month 4: Saver 1 $2020.08 Saver 2 $3030.11
Month 5: Saver 1 $2025.13 Saver 2 $3037.69
Month 6: Saver 1 $2030.19 Saver 2 $3045.28
Month 7: Saver 1 $2035.26 Saver 2 $3052.90
Month 8: Saver 1 $2040.35 Saver 2 $3060.53
Month 9: Saver 1 $2045.45 Saver 2 $3068.18
Month 10: Saver 1 $2050.57 Saver 2 $3075.85
Month 11: Saver 1 $2055.69 Saver 2 $3083.54
Month 12: Saver 1 $2060.83 Saver 2 $3091.25
After setting interest rate to .04
Balances : Saver 1 $2067.70 Saver 2 $3101.55
Urgent!any help and direction will be appreaciated
Ok, here's some help
C++ Syntax (Toggle Plain Text)
class SavingAccount { // put class objects and methods here }
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
•
•
i also knw..but i wan to c the full program ma...
The truth does not change according to our ability to stomach it.
![]() |
Similar Threads
- Bank Account ===>Need help >.< Thk (C++)
- Unable to view yahoo mail or online bank account etc (Viruses, Spyware and other Nasties)
- need to write a class schema asap (Computer Science)
- Bank account class (C++)
Other Threads in the C++ Forum
- Previous Thread: Generic Doubly-Linked List (C++)
- Next Thread: Inverting 24-bit bitmap using fstream c++
Views: 1727 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api array arrays based beginner binary bmp c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete deploy dll download dynamic encryption error file forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib library lines linkedlist linker list loop looping loops map math matrix memory microsoft newbie news number output pointer problem program programming project python random read recursion recursive reference return simple sort spoonfeeding stream string strings struct temperature template templates test text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






