You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
628 B
22 lines
628 B
import AgeIndice from "../Indices/AgeIndice";
|
|
import Person from "../Person";
|
|
import IndiceTester from "./IndiceTester";
|
|
|
|
class IndiceTesterAge implements IndiceTester{
|
|
|
|
private ageIndice: AgeIndice
|
|
|
|
constructor(ageIndice: AgeIndice){
|
|
this.ageIndice = ageIndice;
|
|
}
|
|
|
|
Works(person: Person): boolean {
|
|
return person.getAge() >= this.ageIndice.getMinimum() && person.getAge()<this.ageIndice.getMaximum()
|
|
}
|
|
|
|
TestWorks(person: Person): boolean {
|
|
return person.getAge() >= this.ageIndice.getMinimum() && person.getAge()<this.ageIndice.getMaximum()
|
|
}
|
|
}
|
|
|
|
export default IndiceTesterAge |