02-typescript-abstract-classes-overview
02-typescript-abstract-classes-overview
Abstract Class
Abstract method
Area of circle
π * r2
File: Shape.ts
Abstract method
File: Shape.ts
File: Shape.ts
calculateArea(): number {
return Math.PI * Math.pow(this._radius, 2);
}
}
File: Shape.ts
calculateArea(): number {
Override the return Math.PI * Math.pow(this._radius, 2);
calculateArea() method }
}
File: Shape.ts
calculateArea(): number {
Override the return Math.PI * Math.pow(this._radius, 2);
calculateArea() method }
}
Area of circle
π * r2
File: Shape.ts
calculateArea(): number {
Override the return Math.PI * Math.pow(this._radius, 2);
calculateArea() method }
}
Area of circle
π * r2
… …
… …
… …
… …
… …
Area of rectangle
width * length