nathan gibson wrote:boolean isMale = randomNumber > .5;
Just as a side note, you do know that the changes of being a female are larger than those of being a male this way, right?
randomNumber is between 0 (inclusive) and 1 (exclusive). For simplicity's sake let's only deal with steps of 0.01.
Someone is female for all values from 0 to 0.5 (inclusive) - that's 51 different values. Someone is male for all values from 0.51 to 0.99 (inclusive) - that's 49 different values. To have an even 50-50 match, turn the > into a >=.