aspose file tools
The moose likes Beginning Java and the fly likes Help with constructors Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Help with constructors" Watch "Help with constructors" New topic
Author

Help with constructors

Troy Johnson
Greenhorn

Joined: Sep 24, 2003
Posts: 20
Hello. I am trying to add two additional constructors, one that takes "the annual interest rate" and "loan amount", and another that takes just the "loan amount" only. I am just a little confused on this and looking for any suggestions. Thanks.

[ October 19, 2003: Message edited by: Troy Johnson ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24057
    
  13

Hi Troy,
Why confused? You've already got a default constructor that calls the 3-argument one with three default arguments. Now make two more constructors that take one and two arguments each, and have them pass their arguments, along with 2 and 1 default parameters, respectively, in the right order, of course, to the three argument one; then Bob's your uncle!


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Help with constructors
 
Similar Threads
more help with java problem
Still struggling with constructors
Help with errors again
Mortgage Calculator and GUI
Help on Control Statement