#84 Added interface for view layer
This commit is contained in:
parent
84d14edc4a
commit
89cb234be9
@ -4,10 +4,15 @@ import java.util.Arrays;
|
|||||||
|
|
||||||
public class App {
|
public class App {
|
||||||
|
|
||||||
|
private static CakeBakingService cakeBakingService = new CakeBakingServiceImpl();
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
CakeBakingService cakeBakingService = new CakeBakingServiceImpl();
|
|
||||||
|
// initialize example data
|
||||||
initializeData(cakeBakingService);
|
initializeData(cakeBakingService);
|
||||||
CakeView cakeView = new CakeView(cakeBakingService);
|
|
||||||
|
// create view and render it
|
||||||
|
CakeViewImpl cakeView = new CakeViewImpl(cakeBakingService);
|
||||||
cakeView.render();
|
cakeView.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.iluwatar.layers;
|
package com.iluwatar.layers;
|
||||||
|
|
||||||
public class CakeView {
|
public class CakeViewImpl implements View {
|
||||||
|
|
||||||
private CakeBakingService cakeBakingService;
|
private CakeBakingService cakeBakingService;
|
||||||
|
|
||||||
public CakeView(CakeBakingService cakeBakingService) {
|
public CakeViewImpl(CakeBakingService cakeBakingService) {
|
||||||
this.cakeBakingService = cakeBakingService;
|
this.cakeBakingService = cakeBakingService;
|
||||||
}
|
}
|
||||||
|
|
7
layers/src/main/java/com/iluwatar/layers/View.java
Normal file
7
layers/src/main/java/com/iluwatar/layers/View.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package com.iluwatar.layers;
|
||||||
|
|
||||||
|
public interface View {
|
||||||
|
|
||||||
|
void render();
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user