subject
Engineering, 26.11.2019 02:31 Camill0310

Create a class named accountsavings. this class has a static double variable which stores the annual interest rate for all account holders. the name of variable is annualinterestrate. the class also has another double variable named savingsbalance which stores balance for current account. a. write a constructor to create an account with specified balance. add a validation whether the balance is greater than 0.0. if it is less than 0.0 then throw an exception. b. write a non-static calculatemonthlyinterest method to calculate the monthly interest by multiplying the savingsbalance by annualinterestrate divided by 12 – the interest should be added to savingsbalance. c. write a static method named modifyinterestrate to set the annual interest rate. add a validation whether the rate is greater than equal to 0.0 and less than or equal 1.0. otherwise, throw an exception. d. write a tostring method which returns savingsbalance in a string format. after that, create accountsavingstest class. create two objects from the class accountsavings with balances $2000.00 and $3000.00. then, set the interest rate to 4%, then calculate the monthly interest rate for each 12 months for each object and print the new balances with tostring method for each object. upload accountsavings. java and accountsavingstest. java.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 18:10
For the closed feedwater heater below, feedwater enters state 3 at a pressure of 2000 psia and temperature of 420 °f at a rate of ix10 ibhr. the feedwat extracted steam enters state 1 at a pressure of 1000 psia and enthalpy of 1500 btu/lbm. the extracted er leaves at an enthalpy of 528.7 btu/lbm steam leaves as a saturated liquid. (16) a) determine the mass flow rate of the extraction steam used to heat the feedwater (10) b) determine the terminal temperature difference of the closed feedwater heater
Answers: 3
question
Engineering, 04.07.2019 18:10
Which of the following controllers anticipates the future from the slope of errors over time? a)-proportional b)-on/off c)-integral d)-derivative.
Answers: 2
question
Engineering, 04.07.2019 18:20
Avolume of 2.65 m3 of air in a rigid, insulated container fitted with a paddle wheel is initially at 264 k, 5.6 bar. the air receives 432 kj by work from the paddle wheel. assuming the ideal gas model with cv = 0.71 kj/kg • k, determine for the air the amount of entropy produced, in kj/k
Answers: 2
You know the right answer?
Create a class named accountsavings. this class has a static double variable which stores the annual...
Questions
question
Biology, 07.10.2020 23:01
question
Physics, 07.10.2020 23:01
Questions on the website: 13722359