4 Replies Latest reply: Oct 18, 2008 2:59 PM by 807589 RSS

    Constructor Overloading

    807589
      I am making a program that takes in some information from the user. As an example, the program takes in home phone number and mobile phone number.

      I'd like to give the user the option of just not entering in one of those. I could do this with overloading the constructor. Would this be the best way to do this?

      It seems to get messy since I have a lot of options that the user could leave out and then obviously need a constructor for each. I would have about four constructors. Is this bad practice? If so, what would be the best way to do this?