Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Polimorfismo2;
- import Entidade.Funcionario;
- import Entidade.Gerente;
- public class Principal
- {
- public static void main(String[] args)
- {
- Funcionario f = new Funcionario(1500);
- Gerente g = new Gerente(3600);
- Funcionario s = new Funcionario(2300);
- f.setNome("Ernesto Souza");
- f.setIdade((short)45);
- g.setNome("Astolfo Bastos");
- g.setIdade((short)56);
- g.setBonus(790);
- s.setNome("Carolina");
- s.setIdade((short)22);
- g.setSecretaria(s);
- f.aumentoSalario();
- g.aumentoSalario();
- f.exibeDados();
- g.exibeDados();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement