-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu
More file actions
123 lines (105 loc) · 3.53 KB
/
Copy pathMenu
File metadata and controls
123 lines (105 loc) · 3.53 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
//Author: Danielle White
//Date: 20220115
//Purpose: Chipotle Order Project
import java.util.Locale;
public class Menu{
String orderName;
String protein;
String rice;
String beans;
double cost;
int calories;
public void Menu(){ //default constructor
}
public void setOrderName(String orderName) {
this.orderName = orderName;
}
public String getOrderName(){
return this.orderName;
}
//setter methods
public void setProtein(String p){
this.protein = p;
if (p.equals("barbacoa")){
this.cost = 9.95; //or cost
calories = 170;
}else if(p.equals("sofritas")){
this.cost = 8.60; //or cost
calories = 150;
}else if (p.equals("plant-based chorizo")){
this.cost = 9.60; //or cost
calories = 220;
}else if(p.equals("chicken")){
this.cost = 8.60; //or cost
calories = 180;
}else if(p.equals("steak")){
this.cost = 9.95; //or cost
calories = 150;
}else if(p.equals("carnitas")){
this.cost = 9.10; //or cost
calories = 210;
}else if(p.equals("veggies")){
this.cost = 8.60;
calories = 20;
}
if(getOrderName().equals("quesadilla")){
if (this.protein.equals("barbacoa")) {
this.cost = 10.50; //or cost
this.calories = 170;
} else if (this.protein.equals("sofritas")) {
this.cost = 9.15; //or cost
this.calories = 150;
} else if (this.protein.equals("plant-based chorizo")) {
this.cost = 10.15; //or cost
this.calories = 220;
} else if (this.protein.equals("chicken")) {
this.cost = 9.15; //or cost
this.calories = 180;
} else if (this.protein.equals("steak")) {
this.cost = 10.50; //or cost
this.calories = 150;
} else if (this.protein.equals("carnitas")) {
this.cost = 9.65; //or cost
this.calories = 210;
} else if (this.protein.equals("fajita veggies")) {
this.cost = 9.15;
this.calories = 20;
} else if (this.protein.equals("cheese")) {
this.cost = 9.15;
this.calories = 110;
}
}
}
public void setRice(String r){
this.rice = r;
if(r.equals("white rice")){
calories = calories + 210;
}else if(r.equals("brown rice")){
calories = calories+210;
}
}
public void setBeans(String b){
this.beans = b;
if(b.equals("black beans")){
calories = calories+130;
}else if(b.equals("pinto beans")){
calories = calories+130;
}
}
//getter methods
public String getProtein(){
return this.protein;
}
public String getRice(){
return this.rice;
}
public String getBeans(){
return this.beans;
}
public double getCost(){
return this.cost;
}
public int getCalories(){
return this.calories;
}
}