Tech Off Post

Single Post Permalink

View Thread: Class Design
  • User profile image

    VBJB wrote:
    I see! It's starting to make sense. One other question, let's say the alarm class has five or more properties, would you pass all five of them as constructors or is there another way to do this when a property list is lengthy?

    Ah, style issues. I'd say it depends. If you need all five before the object can perform it's purpose then pass them into the constructor, if you need just 3, have 2 constructors, one taking 3 and one taking 5. And so on.