-
Notifications
You must be signed in to change notification settings - Fork 0
/
XBrasileirao.java
36 lines (27 loc) · 1.18 KB
/
XBrasileirao.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
public class XBrasileirao extends Estocavel{
public XBrasileirao(){
super("X-Brasileirão", 35.00);
}
@Override
public void checarEstoque() throws EstoqueInsuficienteException{
super.checarEstoque(super.getNome(), super.getPao(), super.getQueijo(), super.getCarne(), super.getBacon(), super.getCebola(), super.getTomate(), super.getAlface(), super.getOvo(), super.getBarbecue(), super.getCheddar(), super.getAlho());
}
@Override
public void retirar(){
try {
this.checarEstoque();
super.setPao(super.getPao()-1);
super.setQueijo(super.getQueijo()-1);
super.setCarne(super.getCarne()-1);
super.setBacon(super.getBacon()-1);
super.setCebola(super.getCebola()-1);
super.setTomate(super.getTomate()-1);
super.setAlface(super.getAlface()-1);
super.setOvo(super.getOvo()-1);
super.setBarbecue(super.getBarbecue()-1);
super.setCheddar(super.getCheddar()-1);
super.setAlho(super.getAlho()-1);
} catch (EstoqueInsuficienteException e) {
}
}
}