Created
July 5, 2013 06:37
-
-
Save manfe/5932424 to your computer and use it in GitHub Desktop.
Aprendendo Java - Detalhado
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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