this question pertains to a video game I'm trying to code.
I'm trying to generate people that have characteristics such as age, sex, religion, income etc, such that each attribute is distributed among the people in a specific way. Currently I'm using a map, which stores objects (with specific integer keys corresponding to specific traits).
public class Person {
Map<Integer, Object> personalAttributes;
}
I have another class which is a State.
public class State {
Person[] personArray = new Person[200];
//Instantiates a bunch of Persons and puts the into the array
}
However, I want the people to have 50/50 sex, Gaussian age distribution, and custom religion distribution.
This is important because I want to be able to poll them, and get responses based off of their different traits. How would I do this?