-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcakeBaker.java
More file actions
28 lines (21 loc) · 788 Bytes
/
cakeBaker.java
File metadata and controls
28 lines (21 loc) · 788 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
package com.bakery.bakery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
@Component
public class cakeBaker {
@Autowired
private final ChoclateFrosting choclateFrosting;
@Autowired
private final ChoclateSyrup choclateSyrup;
public cakeBaker(ChoclateFrosting choclateFrosting, ChoclateSyrup choclateSyrup) {
this.choclateFrosting = choclateFrosting;
this.choclateSyrup = choclateSyrup;
}
public void bakeCake() {
System.out.println("cake is baking");
choclateFrosting.getFrostingType();
choclateSyrup.getSyrupType();
System.out.println("cake is ready");
}
}