Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.me.classes;
- public class ContaCorrente {
- private String nome, cpf, email, telefone;
- private double saldo;
- public ContaCorrente (String nome, String cpf, String email, String telefone, double saldo) {
- this.nome = nome;
- this.cpf = cpf;
- this.email = email;
- this.telefone = telefone;
- this.saldo = saldo;
- }
- public String getNome () {
- return this.nome;
- }
- public void setNome (String nome) {
- this.nome = nome;
- }
- public String getCpf () {
- return this.cpf;
- }
- public void setCpf (String cpf) {
- this.cpf = cpf;
- }
- public String getEmail () {
- return this.email;
- }
- public void setEmail (String email) {
- this.email = email;
- }
- public String getTelefone () {
- return this.telefone;
- }
- public void setTelefone (String telefone) {
- this.telefone = telefone;
- }
- public double getSaldo () {
- return this.saldo;
- }
- public void setSaldo (double saldo) {
- this.saldo = saldo;
- }
- public void credito (double valor) {
- this.saldo += valor;
- System.out.println("Valor adicionado a conta!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement