• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help with compound interest program please

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I please need your help with this compound interest program.

What I need to do is:

"Create an application which calculates compound interest on a deposit over a certain period of time -

1. Display the amount of money over the years on a graph. The x-axis should show the number of years, and the y-axis should show the amount of money.

2. Using a thread, display each year and the amount as a point on the graph with a label. Display point about 200 milliseconds apart. The program should loop infinitely.

3. The number of years and the amount must be entered by the user as command arguments. The number of years must range from 1 - 25 and the deposit from 20 - 200.

4. Interest will be 5% per annum
5. Provide error checking for the input boxes.
"

The code that Iv'e done so far is:



I know that the formula for this is:
amount = prevAmount + (prevAmount*interest)

but that's about it. I'm not sure what to do further and if my code is correct this far.

Can anyone help me with this? Please

Thank you
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for 1 & 2 use hard-coded data
when you have it working OK, add the user input/error checking bits

see how you go with hard-coded data, if you strike a problem, post the specific problem
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic