Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 00:00, Kaylaonfleek0956
Consider the series where in this problem you must attempt to use the ratio test to decide whether the series converges. compute enter the numerical value of the limit l if it converges, inf if it diverges to infinity, minf if it diverges to negative infinity, or div if it diverges but not to infinity or negative infinity.
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, tami5
Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. the program should output the average high, average low, and the highest and lowest temper- atures for the year. your program must consist of the following functions: a. function getdata: this function reads and stores data in the two- dimensional array. b. function averagehigh: this function calculates and returns the average high temperature for the year. c. function averagelow: this function calculates and returns the aver- age low temperature for the year. d. function indexhightemp: this function returns the index of the highest high temperature in the array. e. function indexlowtemp: this function retur
Answers: 3
image
Computers and Technology, 24.06.2019 21:30, moonk7733
The hybrid uses 144 to 158 volt batteries.
Answers: 1
image
Computers and Technology, 25.06.2019 04:40, hazeleyes2006
Ineed ! i need a computer whiz to me complete my study guide on computers, it's 50 questions. if anyone can me i'll be greatly appreciated.
Answers: 1
Do you know the correct answer?
Q2: Create class SavingsAccount. Use a static variable annualInterestRate to store theannual interes...

Questions in other subjects:

Konu
Mathematics, 04.10.2021 23:50