-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPedidos.java
46 lines (37 loc) · 1.12 KB
/
Pedidos.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
45
46
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package testeestagio;
/**
*
* @author Chady Chaito
*/
public class Pedidos {
/* Array que representa os pedidos */
private int [] pedido = new int[4];
private String periodo;
/* Construtor de Pedidos */
public Pedidos(){
for(int i = 0 ; i < 4 ; i++){
this.pedido[i] = 0;
}
}
/* Retornar o periodo - Morning ou Night */
public String getPeriodo(){
return this.periodo;
}
/* Retorna o valor do indice */
public int getVetValue(int index){
return this.pedido[index];
}
/* Setando pedidos. SE pediu opção 1 ENTÃO indice 0 = 1 */
public void setPeriodo(String periodo){
this.periodo = periodo;
}
/* Setando pedidos. SE pediu opção 1 ENTÃO indice 0 = 1 */
public void setPedidos(int indice){
this.pedido[indice - 1] += 1;
}
}