Find Jobs
Hire Freelancers

Saving Account

$25-30 USD

Completed
Posted about 22 years ago

$25-30 USD

Paid on delivery
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++
Project ID: 2839184

About the project

8 proposals
Remote project
Active 22 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$12 USD in 14 days
4.9 (69 reviews)
4.2
4.2
8 freelancers are bidding on average $19 USD for this job
User Avatar
See private message.
$25.50 USD in 14 days
4.5 (22 reviews)
5.8
5.8
User Avatar
See private message.
$17 USD in 14 days
5.0 (2 reviews)
5.4
5.4
User Avatar
See private message.
$11.05 USD in 14 days
5.0 (60 reviews)
5.0
5.0
User Avatar
See private message.
$25.50 USD in 14 days
4.7 (48 reviews)
4.3
4.3
User Avatar
See private message.
$25.50 USD in 14 days
5.0 (15 reviews)
3.9
3.9
User Avatar
See private message.
$21.25 USD in 14 days
4.7 (32 reviews)
3.3
3.3
User Avatar
See private message.
$17 USD in 14 days
5.0 (3 reviews)
2.2
2.2

About the client

Flag of UNITED STATES
United States
5.0
3
Member since Feb 3, 2002

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.