abstract class AbstractEngineer {
protected coding(): void {}
}
class ConcreteEngineer extends AbstractEngineer {
private name: string;
private designation: string;
private location: string;
constructor(name: string, designation: string, location: string) {
super();
this.name = name;
this.designation = designation;
this.location = location;
}
public me(): void {
console.log(`I'm ${this.name}, a ${this.designation} who's been living in ${this.location}.`)
}
}
const engineer = new ConcreteEngineer('Maxime Golfier', 'Software Engineer', 'Paris, France');
engineer.me();
maxgfr / maxgfr.github.io Goto Github PK
View Code? Open in Web Editor NEWSource Code
Home Page: https://maxgfr.github.io/
License: MIT License