-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClienteBanco.java
More file actions
57 lines (45 loc) · 1.31 KB
/
Copy pathClienteBanco.java
File metadata and controls
57 lines (45 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.mycompany.sistemasbancario;
/**
*
* @author Tiago Horaguchi Rodrigues
*/
abstract public class ClienteBanco implements Verifica {
private int numeroConta = 0;
private String nome = "";
private Endereco ender = new Endereco();
abstract void verifDoc();
public int getNumeroConta() {
return numeroConta;
}
public void setNumeroConta(int numeroConta) throws NumException {
if (numeroConta < 0) {
throw new NumException();
} else {
this.numeroConta = numeroConta;
}
}
@Override
public void validar() {
if (getNumeroConta() % 2 == 0) {
System.out.println("Numero da Conta é par");
} else {
System.out.println("Numero da Conta é impar");
}
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public Endereco getEnder() {
return ender;
}
public void setEnder(Endereco ender) {
this.ender = ender;
}
}