Last active
August 29, 2015 13:59
-
-
Save samueltcsantos/10512901 to your computer and use it in GitHub Desktop.
Métodos Getters e Setters da Classe Conta
This file contains 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 classes; | |
/** | |
* A classe Conta representa uma conta bancaria simples. | |
* | |
* @author Samuel Santos | |
* | |
*/ | |
public class Conta { | |
private String titular; | |
private String agencia; | |
private int numero; | |
private double saldo; | |
/** | |
* Obter o titular da conta. | |
* @return | |
*/ | |
public String getTitular() { | |
return titular; | |
} | |
/** | |
* Obter a agencia da conta. | |
* @return | |
*/ | |
public String getAgencia() { | |
return agencia; | |
} | |
/** | |
* Obter o numero da conta. | |
* @return | |
*/ | |
public int getNumero() { | |
return numero; | |
} | |
/** | |
* Obter o saldo da conta. | |
* @return | |
*/ | |
public double getSaldo() { | |
return saldo; | |
} | |
/** | |
* Set o titular da conta. | |
* | |
* @param titular | |
*/ | |
public void setTitular(String titular) { | |
this.titular = titular; | |
} | |
/** | |
* Set a agencia da conta. | |
* | |
* @param agencia | |
*/ | |
public void setAgencia(String agencia) { | |
this.agencia = agencia; | |
} | |
/** | |
* Set o número da Conta. | |
* | |
* @param numero | |
*/ | |
public void setNumero(int numero) { | |
this.numero = numero; | |
} | |
/** | |
* Set o saldo da conta. | |
* @param saldo | |
*/ | |
public void setSaldo(double saldo) { | |
this.saldo = saldo; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment