-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCategoria.java
More file actions
39 lines (33 loc) · 819 Bytes
/
Copy pathCategoria.java
File metadata and controls
39 lines (33 loc) · 819 Bytes
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
public class Categoria {
// ==========================
// ATRIBUTOS
// ==========================
private int id;
private String nome;
// ==========================
// CONSTRUTOR
// ==========================
public Categoria(int id, String nome) {
this.id = id;
this.nome = nome;
}
// ==========================
// GETTERS E SETTERS
// ==========================
public int getId() {
return this.id;
}
public String getNome() {
return this.nome;
}
public void setNome(String nome) {
this.nome = nome;
}
// ==========================
// EXIBIÇÃO
// ==========================
@Override
public String toString() {
return "[" + this.id + "] " + this.nome;
}
}