Java
3
Вклад в тег
abstract class Figure {
getArea(): void{
console.log("Not Implemented")
}
abstract getColor(): void // {} <<<<<<<<<<<<<<
}
class Rectangle extends Figure{
getColor() {
console.log('is red');
}
}
// const f = new Figure(); // error
const r = new Rectangle();
console.log(r)
r.getArea();
r.getColor();