1
2
3
4
5
6
7
8
9
10 package tempcontroller.base;
11
12
13
14
15
16 public class SystemFactory {
17
18
19 private SystemFactory() {
20 }
21
22 private static SystemFactory factory;
23 public static SystemFactory getFactory() {
24 if(factory == null) {
25 factory = new SystemFactory();
26 }
27
28 return factory;
29 }
30
31 public IAmostragem crateAmostragem() {
32 return new AmostragemSimples();
33 }
34
35 public IProgramacaoAmostragem createProgramacao() {
36 return new ProgramacaoAmostragemSimples();
37 }
38
39 public IControladorAmostragem createControladorAmostragem() {
40 return new ControladorAmostragem();
41 }
42 }