954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

java interest program help?

Hey,
Im writing an interest program for in java and i ahve a question about an easier method to obtain the user input. I have to get the amount the user wishes to input, the % interest, the annual rate (36 months, or 2 years ) and the compound rate ( monthly, daily, yearly). I need a better way to find out if the user has inputed 36 months or 2 years, same thing with the compound rate. As it is now, im using ALOT of if statements, there has to be a better way.

mowhawk
Newbie Poster
1 post since Oct 2008
Reputation Points: 10
Solved Threads: 0
 

You could create methods that return different values based upon the input, but you still need if statements to do that. Would it be possible for me to see what you have? It would be much easier for me to help.

jasimp
Senior Poster
3,623 posts since Aug 2007
Reputation Points: 533
Solved Threads: 53
 
... an easier method to obtain the user input.

easier compared to what? and what do you have to test on? perhaps you do need all those if's

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You