-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDespesas
65 lines (49 loc) · 1.34 KB
/
Despesas
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
58
59
60
61
62
63
64
65
package entities;
public class Despesas {
private int year;
private double totalValue;
private String type;
protected int op;
public Despesas(){}
public Despesas(int op,int year, double totalValue, String type) {
this.op = op;
this.year = year;
this.totalValue = totalValue;
this.type = type;
}
public int getYear() {
return year;
}
public void setYear(int year) {
this.year = year;
}
public double getTotalValue() {
return totalValue;
}
public void setTotalValue(double totalValue) {
this.totalValue = totalValue;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public String toString() {
if(op==1){
return "\nDespesas:\n\n>>Imposto" + "\nNome da Despesa: " + type + "\nTotal pago: " + totalValue
+ "\nAno de Ocorrência: " + year + "\n";
}
else if(op==2){
return "\nDespesas:\n\n>>Seguro" + "\nNome da despesa: " + type + "\nTotal pago: " + totalValue
+ "\nAno de Ocorrência: " + year + "\n";
}
else if(op==3){
return "\nDespesas:\n\n>>Financiamento" + "\nNome da despesa: " + type + "\nTotal pago: " + totalValue
+ "\nAno de Ocorrência: " + year + "\n";
}
return "\nDespesas:\n\n>>Multas" + "\nNome da despesa: " + type + "\nTotal pago: " + totalValue
+ "\nAno de Ocorrência: " + year + "\n";
}
}