-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaneta.java
More file actions
49 lines (39 loc) · 892 Bytes
/
Caneta.java
File metadata and controls
49 lines (39 loc) · 892 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
40
41
42
43
44
45
46
47
48
package aulapratica;
public class Caneta {
public String modelo;
public String cor;
private float ponta;
protected int carga;
protected boolean tampada;
public String getModelo() {
return modelo;
}
public void setModelo(String modelo) {
this.modelo = modelo;
}
public String getCor() {
return cor;
}
public void setCor(String cor) {
this.cor = cor;
}
public float getPonta() {
return ponta;
}
public void setPonta(float ponta) {
this.ponta = ponta;
}
public int getCarga() {
return carga;
}
public void setCarga(int carga) {
this.carga = carga;
}
public void status() {
System.out.println("SOBRE A CANETA ");
System.out.printf("Modelo: %s%n", this.getModelo());
System.out.printf("Ponta: %.2f%n", this.getPonta());
System.out.printf("Carga: %d%n", this.getCarga());
System.out.printf("Cor: %s%n", this.getCor());
}
}