public class Person { private static final int MAX_PEOPLE_COUNT = 100; private String name; private int age; private static int peopleCount; public Person(String name, int age) { this.name = name; this.age = age; peopleCount++; } public static int howManyPeople() { return peopleCount; } public boolean maxPeopleCountReached() { return peopleCount >= MAX_PEOPLE_COUNT; } }