-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathFilling.java
More file actions
46 lines (39 loc) · 1 KB
/
Filling.java
File metadata and controls
46 lines (39 loc) · 1 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
package com.booleanuk.core;
public class Filling implements Item {
private String variant;
private String name;
private String sku;
private float price;
public Filling (String variant) {
this.variant = variant.toUpperCase();
this.name = "Filling";
this.price = 0.12F;
setRest();
}
private void setRest(){
switch(this.variant) {
case "BACON" -> this.sku = "FILB";
case "CHEESE" -> this.sku = "FILC";
case "CREAM CHEESE" -> this.sku = "FILX";
case "SMOKED SALMON" -> this.sku = "FILS";
case "HAM" -> this.sku = "FILH";
case "EGG" -> this.sku = "FILE";
}
}
@Override
public String getVariant() {
return this.variant;
}
@Override
public float getPrice() {
return this.price;
}
@Override
public String getSku() {
return this.sku;
}
@Override
public String getName() {
return this.name;
}
}