Created
July 5, 2013 06:12
-
-
Save manfe/5932315 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
| public class TV { | |
| private int tamanho; | |
| private int canal; | |
| private int volume; | |
| private boolean ligada; | |
| // construtor vazio (sem parâmetros) | |
| public TV() { | |
| } | |
| // construtor com parâmetros | |
| public TV(int tamanho, int canal, int volume, boolean ligada) { | |
| this.tamanho = tamanho; | |
| this.canal = canal; | |
| this.volume = volume; | |
| this.ligada = ligada; | |
| } | |
| public int getTamanho() { | |
| return tamanho; | |
| } | |
| public void setTamanho(int tamanho) { | |
| this.tamanho = tamanho; | |
| } | |
| public int getCanal() { | |
| return canal; | |
| } | |
| public void setCanal(int canal) { | |
| this.canal = canal; | |
| } | |
| public int getVolume() { | |
| return volume; | |
| } | |
| public void setVolume(int volume) { | |
| this.volume = volume; | |
| } | |
| public boolean isLigada() { | |
| return ligada; | |
| } | |
| public void setLigada(boolean ligada) { | |
| this.ligada = ligada; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment