subject

Write a java program that calculates a bank account balance at the end of a year. the input is initial balance, interest rate and number of times the interest is calculated (called compounding period). the formula to calculate the new balance is given below: new_balance = initial_balance*(1+interest_rate/n) n where n is the compounding period: n=1 for annually, n=2 for semiannually, n=4 for quarterly, n=12 for monthly and n=360 for daily. your program should contain a program header (program description, your name and date etc), define variables to store initial balance, new balance, interest rate and compounding period. and then use the formula to do the calculation with interest rate 3.5% and n of your choice for initial balance = 1,000, 2,000, 3,000, 4,000, 5,000, 6,000, 7,000, 8,000, 9,000, and 10,000 dollars respectively using a loop. the output should have the following format: for initial balance of 1,000, the account balance at the end of one year is and the interest is for initial balance of 2,000, the account balance at the end of one year is and the interest is for initial balance of 10,000, the account balance at the end of one year is and the interest is where are the result of your program.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When using a public computer or network, you should always
Answers: 2
question
Computers and Technology, 23.06.2019 05:30
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
When making changes to optimize part of a processor, it is often the case that speeding up one type of instruction comes at the cost of slowing down something else. for example, if we put in a complicated fast floating-point unit, that takes space, and something might have to be moved farther away from the middle to accommodate it, adding an extra cycle in delay to reach that unit. the basic amdahl's law equation does not take into account this trade-off. a. if the new fast floating-point unit speeds up floating-point operations by, on average, 2ă—, and floating-point operations take 20% of the original program's execution time, what is the overall speedup (ignoring the penalty to any other instructions)? b. now assume that speeding up the floating-point unit slowed down data cache accesses, resulting in a 1.5ă— slowdown (or 2/3 speedup). data cache accesses consume 10% of the execution time. what is the overall speedup now? c. after implementing the new floating-point operations, what percentage of execution time is spent on floating-point operations? what percentage is spent on data cache accesses?
Answers: 2
You know the right answer?
Write a java program that calculates a bank account balance at the end of a year. the input is initi...
Questions
question
Mathematics, 25.07.2020 14:01
Questions on the website: 13722363