subject

Q2: Create class SavingsAccount. Use a static variable annualInterestRate to store theannual interest rate for all account holders. Each object of the class contains a privateinstance variable savingsBalance indicating the amount the saver currently has on deposit. Provide method calculateMonthlyInterest to calculate the monthly interest by multiplying thesavingsBalance by annualInterestRate divided by 12—this interest should be added tosavings-Balance. Provide a static method modifyInterestRate that sets theannualInterestRate to a new value. Write a program to test class SavingsAccount. Instantiatetwo savingsAccount objects, saver1 and saver2, with balances of $2000.00 and $3000.00,respectively. Set annualInterestRate to 4%, then calculate the monthly interest for each of 12months and print the new balances for both savers. Next, set the annualInterestRate to 5%,calculate the next month’s interest and print the new balances for both savers.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
Which is a false statement considering copyright law? a. when people upload something to the internet they automatically receive a copyright for the work b. the work does not have to contain a copyright notice to be considered having a copyright c. copyright is legal term describing rights given to the creators for literary and artistic works d. personal pictures are always covered by copyrights
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
What is the power dissipated by a resistor with a current of 0.02 a and a resistance of 1,000 ? a. 200 w b. 20 w c. 0.4 w d. 4 w
Answers: 1
question
Computers and Technology, 23.06.2019 07:50
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
question
Computers and Technology, 24.06.2019 02:50
Be sure to answer all parts. synthesize the following compound from benzene. a. b. c. d. e. f. reaction [1] conditions: a b c d e f reaction [1] product: draw structure reaction [2] conditions: a b c d e f reaction [2] product: draw structure reaction [3] conditions: a b c d e f reaction [3] product:
Answers: 3
You know the right answer?
Q2: Create class SavingsAccount. Use a static variable annualInterestRate to store theannual interes...
Questions
question
Mathematics, 09.04.2021 23:00
question
Mathematics, 09.04.2021 23:00
question
Mathematics, 09.04.2021 23:00
question
Biology, 09.04.2021 23:00
Questions on the website: 13722363