java interest program help?

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2008
Posts: 1
Reputation: mowhawk is an unknown quantity at this point 
Solved Threads: 0
mowhawk mowhawk is offline Offline
Newbie Poster

java interest program help?

 
0
  #1
Oct 12th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 3,584
Reputation: jasimp has a spectacular aura about jasimp has a spectacular aura about jasimp has a spectacular aura about 
Solved Threads: 52
Featured Poster
jasimp's Avatar
jasimp jasimp is offline Offline
Senior Poster

Re: java interest program help?

 
0
  #2
Oct 12th, 2008
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.
"Argyou not with the hand you are dealt in cards or life." ---- Wizard and Glass
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

Re: java interest program help?

 
0
  #3
Oct 13th, 2008
Originally Posted by mowhawk View Post
... 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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC