-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTacoLab.java
More file actions
58 lines (47 loc) · 1.23 KB
/
Copy pathTacoLab.java
File metadata and controls
58 lines (47 loc) · 1.23 KB
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
public class TacoLab {
private String filling;
private String topping;
private String shell;
private double price;
private boolean tuesday;
public TacoLab(){
filling = "cheese";
topping = "salsa";
shell = "soft";
price = 10.00;
tuesday = false;
}
public TacoLab(String strFilling, String strTopping, String strShell,
boolean fctTuesday){
filling = strFilling;
topping = strTopping;
shell = strShell;
price = 10.00;
tuesday = fctTuesday;
}
public void setFilling(String strFilling){
filling = strFilling;
}
public void addTopping(String strTopping){
topping = topping + " and " + strTopping;
price = price + 0.50;
}
public void setShell(String strShell){
shell = strShell;
}
public void TacoTuesday(boolean fctTuesday){
if (fctTuesday) { price = price - (price * 0.1); }
}
public String getFilling (){
return filling;
}
public String getToppings (){
return topping;
}
public String getShell (){
return shell;
}
public double getPrice (){
return price;
}
}