Reputation: 307
I'm creating a class called Location
that has 7 instance variables, such as street
, suburb
, city
, etc.
While I was creating all the different constructors with different signatures (including the default constructor), I started thinking that there must be an easier way to go about doing this. If I had a class with 15 or so instance variables, I could spend all day typing out the possibilities.
Am I right in thinking that there is an easier method?
Upvotes: 0
Views: 89