Skip to content

Commit

Permalink
Polimorfismo en JavaScript
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianC47 committed Sep 6, 2022
1 parent 8098fc1 commit 34cbcbc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Leccion11/11-01-POO.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@ class Gerente extends Empleado{
}
}

function imprimir(tipo){
console.log(tipo.obtenerDetalles());
}


let empleado1 = new Empleado("Lionel",2500);
console.log(empleado1.obtenerDetalles());

let gerente1 = new Gerente('Carlos',5000,"Sistemas");
console.log(gerente1.obtenerDetalles())

imprimir(empleado1);
imprimir(gerente1);
Binary file removed Leccion11/Herencia.PNG
Binary file not shown.
Binary file added Leccion11/Sobreescritura2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Leccion11/polimorfismo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 34cbcbc

Please sign in to comment.