code: private AssignmentField selectField(AssignmentField[] fields, int index)
     {
        if (index < 1 || index > fields.length)
        {
           throw new IllegalArgumentException(index + " is not a valid field index");
        }
        return (fields[index - 1]);
     }
docs: Maps a field index to an AssignmentField instance.
  
  @param fields array of fields used as the basis for the mapping.
  @param index required field index
  @return AssignmnetField instance