Skip to content

Instantly share code, notes, and snippets.

@manfe
Created July 5, 2013 06:37
Show Gist options
  • Select an option

  • Save manfe/5932424 to your computer and use it in GitHub Desktop.

Select an option

Save manfe/5932424 to your computer and use it in GitHub Desktop.
Aprendendo Java - Detalhado
package classeAbstrata;
public class TV extends Eletrodomestico {
private int tamanho;
private int canal;
private int volume;
/* implementação dos métodos abstratos */
public void desligar() {
super.setLigado(false);
setCanal(0);
setVolume(0);
}
public void ligar() {
super.setLigado(true);
setCanal(3);
setVolume(25);
}
// abaixo teríamos todos os métodos construtores get e set...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment