abstract class Family {
constructor(
protected weight: number,
private age: number,
public name: string
) {}
abstract getSize():void //call signiture만 가지고 있어야함. 구현xx
getAllInfo(){
return `${name} ${age} ${weight}`
}
}
class Dog extends Family {
//여기서 getSize를 구현해야한다.
getSize() {
if(this.size > 3.8) {
console.log('large');
}
}
}
const seolgi = new Dog(4.5, "seolgi");
seolgi.getAllInfo