private static double GetVoteFactor(PersonWithEstimatedIQ person, Data data) { var estimatedIq = person.EstimatedIQ; double voteFactor; if (estimatedIq <= data.EstimatedIQ25) { voteFactor = -1; } else if (estimatedIq <= data.EstimatedIQ50) { voteFactor = -0.5; } else if (estimatedIq <= data.EstimatedIQ75) { voteFactor = +0.5; } else { voteFactor = +1; } return(voteFactor); }
public PersonWithVoteFactor(PersonWithEstimatedIQ person) { this.IQ = person.IQ; this.EstimatedIQ = person.EstimatedIQ; }