create a SavingAccount class. Use a static data member to contain the annualInterestRate for each of the savers. Each member of the class contain a private data member savingBalance indicating the amount the saver currently has on deposit. Provide tiplying the balance by annualInterestRate divided by 12;this interest should be added to [login to view URL] a static member function modifyInterestRate that sets the static annualInterestRate to a new value. Write a driver program to test class SavingAccount. Instantiate two different savingAccount objects,saver1 and saver2, with balance of $2000 and $3000 respectively. Make annualInterestRate = 3% to calculate monthly interest and print the new balance for each of the savers. Then set annualInterestRate= 4% and calculate the next month interest and print the new balances for each savers.
## Deliverables
Create a class named SavingsAccount : (1) The SavingsAccount class must contain a static data member, annualInterestRate, that is the same for all accounts. (2) The annualIterestRate member should be initialized appropriately, based on a named constant set to 2.7%. (3) Each object created should have a private data member named savingsBalance. (4) Include the constructors: default, conversion (sets the balance to any given non-negative number), and copy. (5) Provide a member function named compoundMonthlyInterest that returns the amount of interest earned on the account (balance * annualInterestRate/12.0) and adds it to the balance. (6) Provide a static member function setInterestRate that establishes a new interest rate. You should verify that the new interest rate is greater than 0 and no greater than 0.15 (15%). (7) Provide set and get methods for the account balance. Validate the balance so it cannot be set to a negative value. (8) Provide a method named showBalance that displays the balance of the account right-justified in a field of 20 characters. The number must have two decimal places and a $ in front of the first digit. For example, if the balance is zero, it should display $0.00 (with leading spaces). Develop a "driver" program to test your class. (1) It should instantiate an array of NUM_ACCOUNTS (try 6) of type SavingsAccounts. After the array is instantiated, set the starting balance of each account to a different random number (use rand) with the range 100 to 10,000 (use named constants for the min and max starting balances). (2) Display the balances of all the accounts, (3) then apply the compoundMonthlyInterest method to each account, displaying the interest earned on each account. (4) Then display all of the new balances. (5) Next, set the annualInterestRate to 3.5% and repeat the above instructions Be sure to insert a "press any key to continue" message when needed so information does not scroll off the screen before it can be read. Be sure to make good choices about naming variables and members, parameter passing mechanisms, and access privileges (const/non-const). Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
## Platform
Visual C++