-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSandwich2.java
More file actions
35 lines (29 loc) · 970 Bytes
/
Sandwich2.java
File metadata and controls
35 lines (29 loc) · 970 Bytes
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
/**
* Sandwich2
*/
public class Sandwich2 {
private Bread bread;
private SandwichFilling filling;
public Sandwich2() {
bread = new Bread();
filling = new SandwichFilling();
}
public Sandwich2(String typeOfBread, short caloriesPerSlice, String typeOfFill, short caloriesInfilling) {
bread = new Bread(typeOfBread, caloriesPerSlice);
filling = new SandwichFilling(typeOfFill, caloriesInfilling);
}
public Sandwich2(String typeOfBread, short caloriesPerSlice) {
bread = new Bread(typeOfBread,caloriesPerSlice);
filling = new SandwichFilling();
}
public Sandwich2(short caloriesInfilling,String typeOfFill) {
bread = new Bread();
filling = new SandwichFilling(typeOfFill,caloriesInfilling);
}
public Bread getBread() {
return bread;
}
public SandwichFilling getFilling() {
return filling;
}
}