forked from ES2-UFPI/aula_github_2024-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRelatorioSaque.java
44 lines (33 loc) · 1.02 KB
/
RelatorioSaque.java
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
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class RelatorioSaque {
private Conta conta;
private float valorSaque;
// private String dataSaque;
private float saldoAnterior;
private float saldoFinal;
private LocalDateTime horaSaque;
public RelatorioSaque(Conta conta, float valorSaque, float saldoAnterior, float saldoFinal) {
this.conta = conta;
this.valorSaque = valorSaque;
this.saldoAnterior = saldoAnterior;
this.saldoFinal = saldoFinal;
this.horaSaque = LocalDateTime.now();
}
public Conta getConta(){
return conta;
}
public float getValorSaque(){
return valorSaque;
}
public float getSaldoAnterior(){
return saldoAnterior;
}
public float getSaldoFinal(){
return saldoFinal;
}
public String getHoraSaque(){
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss");
return horaSaque.format(formatter);
}
}