DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   java interest program help? (http://www.daniweb.com/forums/thread150747.html)

mowhawk Oct 12th, 2008 3:49 pm
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.

jasimp Oct 12th, 2008 4:08 pm
Re: java interest program help?
 
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.

stultuske Oct 13th, 2008 6:02 am
Re: java interest program help?
 
Quote:

Originally Posted by mowhawk (Post 711012)
... 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


All times are GMT -4. The time now is 1:57 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC