Results 1 to 13 of 13
7Likes Thread: program ,deposit of an amount of money in a bank
- 08-03-2012, 09:33 PM #1
Member
- 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.
And same output, for IniAmount = 1000$.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
- 08-03-2012, 09:43 PM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
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.
- 08-03-2012, 09:53 PM #3
Member
- 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?~
- 08-03-2012, 10:10 PM #4
Member
- 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? .....
- 08-03-2012, 10:21 PM #5
Member
- 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
- 08-03-2012, 10:26 PM #6
Member
- 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....
- 08-03-2012, 10:35 PM #7
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,603
- Blog Entries
- 7
- Rep Power
- 17
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,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 08-03-2012, 10:48 PM #8
Member
- 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?
- 08-03-2012, 10:55 PM #9
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,603
- Blog Entries
- 7
- Rep Power
- 17
Re: program ,deposit of an amount of money in a bank
You just wrote it down yourself: newAmount= oldAmount*1.06
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 08-04-2012, 01:48 AM #10
Member
- 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; 08-04-2012 at 02:56 AM.
-
Re: program ,deposit of an amount of money in a bank
You sent this to me as a private message:
Please don't sent private messages like this. Instead please let's discuss your issues in public in the forum.
Originally Posted by aou
Thanks.
- 08-04-2012, 09:35 PM #13
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,603
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Bank program difficulties
By LifeElixer in forum New To JavaReplies: 8Last Post: 10-21-2011, 04:42 AM -
writing a program to read a specific amount of lines from a file?
By welikedogs in forum New To JavaReplies: 4Last Post: 11-03-2010, 06: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: 09-25-2010, 07:03 PM -
java program for updating bank details
By java__beginner in forum New To JavaReplies: 5Last Post: 03-12-2009, 03:42 PM -
Work & Earn money from home, use rebate lower price save money $$$
By arturmoniswork in forum Reviews / AdvertisingReplies: 0Last Post: 12-30-2008, 05:57 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks