Results 1 to 13 of 13
7Likes
Thread: program ,deposit of an amount of money in a bank
 08032012, 10:33 PM #1Member
 Join Date
 Aug 2012
 Posts
 6
 Rep Power
 0
program ,deposit of an amount of money in a bank
dear
please i need ur help on this question please any hint
A customer makes a deposit of an amount of money in a bank, this amount is designed by IniAmount ,
The bank gives 6% of compound interest, which means that at the end of the year, the new amount is calculated based on FinAmount.
What you should do:
You should write a java code; This code should calculate the FinAmount at the end of each year.
Java Code:The output should have this structure: IniAmount = 100 $ Year FinAmount 1 amount1 2 amount2 . . . . . . 10 amount10
Part b:
In this part, you take the same problem, but this time, you should write a java code, that calculate the number of years, after what the FinAmount becomes the double of IniAmount.
The output should be as following:
Java Code:IniAmount Interest Number of year 100 3% n 1000 2% n 10000 1.5% n
 08032012, 10:43 PM #2Moderator
 Join Date
 Jul 2010
 Location
 California
 Posts
 1,641
 Rep Power
 7
Re: program ,deposit of an amount of money in a bank
Please don't duplicate posts. And we are not a homework service nor a code service, so please don't dump what I presume to be your homework onto the forums. If you have a particular question regarding your attempt, then please ask.
 08032012, 10:53 PM #3Member
 Join Date
 Aug 2012
 Posts
 6
 Rep Power
 0
Re: program ,deposit of an amount of money in a bank
dear sir
i need the way of solving this question as i said im newto java
any hint or psedu cod plz?~
 08032012, 11:10 PM #4Member
 Join Date
 Aug 2012
 Posts
 5
 Rep Power
 0
Re: program ,deposit of an amount of money in a bank
look after 1 year it ll be amount * 1.06 right?
than the second year it will be 1.06 * 1.06 * amount, right?
third year 1.06 * 1.06 * 1.06 * amount ... right?
..... so i guess if you want an easy explicit formula that just does the job you use this one money after n years = 1.06^n * amount......
.... was this helpful? .....
 08032012, 11:21 PM #5Member
 Join Date
 Aug 2012
 Posts
 6
 Rep Power
 0
Re: program ,deposit of an amount of money in a bank
thank you sir
what is the formula used to get amount*1.06?
plz can u write in psedu code so i can do some change
thanks
 08032012, 11:26 PM #6Member
 Join Date
 Aug 2012
 Posts
 5
 Rep Power
 0
Re: program ,deposit of an amount of money in a bank
.... well...... i dont know...... maybe it could look something like this in java.......
public double moneyAfterNYears(int n){
return this.amount * Math.pow(1.06, n);
}
..... but i think really you should try a little bit harder yourself.... i will go to bed now.... good luck with your homework....
 08032012, 11:35 PM #7
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 13,776
 Blog Entries
 7
 Rep Power
 21
Re: program ,deposit of an amount of money in a bank
Before this starts to be another spoonfeeding thread I suggest the OP to give it a try and come back afterwards if there's still some trouble.
kind regards,
Joscenosillicaphobia: the fear for an empty beer glass
 08032012, 11:48 PM #8Member
 Join Date
 Aug 2012
 Posts
 6
 Rep Power
 0
Re: program ,deposit of an amount of money in a bank
in question said
code should calculate the FinAmount at the end of each year.
how i can do it?
and as the ftftftft said
look after 1 year it ll be amount * 1.06 right?
than the second year it will be 1.06 * 1.06 * amount, right?
third year 1.06 * 1.06 * 1.06 * amount ... right?
..... so i guess if you want an easy explicit formula that just does the job you use this one money after n years = 1.06^n * amount......
what is the formula used to get amount*1.06?
 08032012, 11:55 PM #9
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 13,776
 Blog Entries
 7
 Rep Power
 21
Re: program ,deposit of an amount of money in a bank
You just wrote it down yourself: newAmount= oldAmount*1.06
kind regards,
Joscenosillicaphobia: the fear for an empty beer glass
 08042012, 02:48 AM #10Member
 Join Date
 Aug 2012
 Posts
 6
 Rep Power
 0

Re: program ,deposit of an amount of money in a bank
Take care not to make sloppy mistakes. It's not 1.6, it's 1.06. 1 is the multiplication identity multiplier and 0.06 is the 6% interest rate. To calculate what a number will be after adding 6% interest, you multiply that number by 1.06. For example if you want to know what %100 will be after adding 6% interest you calculate 100 + 100 * 0.06 which equals 100 * 1 + 100 * 0.06 which equals 100 * (1 + 0.06), which equals 100 * 1.06. QED.
Last edited by Fubarable; 08042012 at 03:56 AM.

Re: program ,deposit of an amount of money in a bank
You sent this to me as a private message:
Originally Posted by aou
Thanks.
 08042012, 10:35 PM #13
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 13,776
 Blog Entries
 7
 Rep Power
 21
Similar Threads

Bank program difficulties
By LifeElixer in forum New To JavaReplies: 8Last Post: 10212011, 05:42 AM 
writing a program to read a specific amount of lines from a file?
By welikedogs in forum New To JavaReplies: 4Last Post: 11032010, 07:17 PM 
use an intermediate variable in the money transfer and not manually input the amount
By SOLOshadow in forum New To JavaReplies: 2Last Post: 09252010, 08:03 PM 
java program for updating bank details
By java__beginner in forum New To JavaReplies: 5Last Post: 03122009, 04:42 PM 
Work & Earn money from home, use rebate lower price save money $$$
By arturmoniswork in forum Reviews / AdvertisingReplies: 0Last Post: 12302008, 06:57 AM
Bookmarks