/** * @param age * @param name * @param language */ public Human(int age, String name, ArrayList<Language> language) { this.age = age; this.name = name; this.language = language; Human.setAgeSum(Human.getAgeSum() + age); Human.setInstanceCount(Human.getInstanceCount() + 1); putInLanguageCollection(); }
@Override public float getMiddleAge() { // TODO Auto-generated method stub return (Human.getAgeSum() / Human.getInstanceCount()); }