-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProduto.java
More file actions
38 lines (28 loc) · 767 Bytes
/
Produto.java
File metadata and controls
38 lines (28 loc) · 767 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
public abstract class Produto {
protected int quantidade, sabor;
protected String tamanho;
public Produto(int quantidade, String tamanho, int sabor) {
this.quantidade = quantidade;
this.tamanho = tamanho;
}
public int getQuantidade() {
return quantidade;
}
public void setQuantidade(int quantidade) {
this.quantidade = quantidade;
}
public String getTamanho() {
return tamanho;
}
public void setTamanho(String tamanho) {
this.tamanho = tamanho;
}
public int getSabor() {
return sabor;
}
public void setSabor(int sabor) {
this.sabor = sabor;
}
public abstract double calcularPreco();
public abstract String nomeSabor();
}