// Héritable de classe

abstract class Sujet {
    private nom:string;
    protected prenom:string;
    constructor( nom:string, prenom:string ) {
        this.nom = nom;
        this.prenom = prenom;
    }

    protected abstract activite():void;
}

class Employe extends Sujet {
    private poste:string;
    private salaire:number;

    constructor( nom:string,prenom:string,poste:string,salaire:number ) {
        super( nom, prenom );
        this.poste = poste;
        this.salaire = salaire;
    }

    public travailler():void {
        this.activite();        
    }

    protected activite(): void {
        console.log( `${this.prenom} est ${this.poste}` );        
    }
}

const personne1 : Employe = new Employe( "brillant", "alexandre", "informaticien", 1000 );
personne1.travailler();




