I have a class that has about 20 attributes which can be devided in 10 groups having two attributes of type minValue and maxValue.
I am wondering how to define the object's constructor. I have two options:
First one,
public myClass(minValueType1, maxValueType1, minValueType2,maxValueType2,....,minValueType10, maxValueType10) Second one,
public myClass(type1Arr[],type2Array[],......,type10Array[]) where each array has length of 2 with minValue and maxValue.
Which way do you think is better?
Rangeclass with ancontains(int value)method. Even without this method, grouping min and max together makes sense and justifies the creation of this class.