public Adult() { this.gender = rand.RandomGender(); this.name = rand.RandomName(); if (new Random().Next(0, 6) > 2) { this.child = new Child(); hasChild = true; } if (hasChild) isBoring = false; }
public Adult(string name, string gender, Child child) { this.name = name; if (gender == "male" || gender == "female") this.gender = gender; else this.gender = new RandomGenerator().RandomGender(); if (child != null) this.child = child; hasChild = true; if (hasChild) isBoring = false; }