예제 #1
0
    }                                                                                     // new members of HomoNeanderthalensis now.

    public HomoNeanderthalensis makingNewOne(int year, int age, double mass, String sex)
    {
        if (year <= -2000 && year >= -4000)
        {
            HomoNeanderthalensis human = new HomoNeanderthalensis(age, mass, sex);
            return(human);
        }
        return(null);
    }
예제 #2
0
    }                                                                                     // deleted old not valid now comment

    public HomoNeanderthalensis makingNewOne(int year, HomoNeanderthalensisStruct someHuman)
    {
        const int minYears = -4000;
        const int maxYears = -2000;

        if (year <= maxYears && year >= minYears) // magic constants replaced with constants
        {
            HomoNeanderthalensis human = new HomoNeanderthalensis(someHuman.age, someHuman.mass, someHuman.sex);
            return(human);
        }
        return(null);
    }