Results 1 to 2 of 2
- 02-22-2010, 11:46 PM #1Member
- Join Date
- Feb 2010
- Rep Power
Need help creating this java program
I've just started taking a java class here at a local tech school and I was ill for about two weeks and unable to attend class. The teacher is STILL making me complete the following assignment and I don't even know where to start because I was unable to attend lecture. If someone could please help me out I'd greatly appreciate it.
Write a program that a bank can use to figure the final amount available for the investor to withdraw. The program should ask ( prompt ) the user for Initial Amount and number of months the money will be deposited. The bank currently pays 4% interest yearly. The formula the bank uses to figure the Final Amount is :
Final Amount = ( ( 1 + Yearly Interest Rate ) raised to the power of Number of years ) * Initial Amount.
Use the Math.pow method in your computations. Three examples of using Math.pow are :
Math.pow ( 2 , 3 ) returns 8.0
Math.pow ( 3 , 2 ) returns 9.0
Math.pow ( 3.5 , 2.5 ) returns 22.911765
The bank decided to be generous in figuring the number of years by rounding up any fraction years. Example : 14 months will be considered 2 years.
A sample run would look like this :
Enter Initial Amount : 1000.00
Number of months you will leave money in Bank : 14
Bank will give you credit for 2 years
Final Amount is : 1081.60
If someone could please help me out I'd greatly appreciate it.
Have a look at these and your notes and then come on back if you have a specific question.
- By rolls in forum New To JavaReplies: 3Last Post: 08-10-2009, 07:34 AM
- By cuse17 in forum New To JavaReplies: 2Last Post: 02-23-2009, 03:18 AM
- By Bascotie in forum New To JavaReplies: 2Last Post: 01-18-2009, 07:27 AM
- By priyanka.dandekar in forum Advanced JavaReplies: 9Last Post: 10-05-2008, 11:04 PM
- By Java Tip in forum java.ioReplies: 0Last Post: 04-04-2008, 03:40 PM