class Animal {
constructor(name, age, gender, height, weight) {
this.name = name;
this.age = age;
this.gender = gender;
}
run() {
console.log('I\'m runing');
}
getName() {
return this.name;
}
setName(newName) {
this.name = newName;
}
getAge() {
return this.age;
}
setAge(newAge) {
this.age = newAge;
}
static greet() {
console.log('Hello! I\'m animal');
}
}
class Mammal extends Animal {
constructor(name, age, gender, kind) {
super();
this.kind = kind;
//Mammal.greet(name, age, gender, kind);
}
eat() {
console.log('I\'m runing');
}
static greet(name, age, gender, kind) {
console.log(`Hello! I'm mammal. My name ${name}, age ${age}, gender ${gender}, kind ${kind}`);
}
}