Skip to content

Commit c51eb66

Browse files
author
Fiordy
authored
docs: abstract-factory - readme - corrected code description as per real file (iluwatar#1887)
1 parent 1eb7420 commit c51eb66

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

abstract-factory/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -87,24 +87,36 @@ public interface KingdomFactory {
8787
}
8888

8989
public class ElfKingdomFactory implements KingdomFactory {
90+
91+
@Override
9092
public Castle createCastle() {
9193
return new ElfCastle();
9294
}
95+
96+
@Override
9397
public King createKing() {
9498
return new ElfKing();
9599
}
100+
101+
@Override
96102
public Army createArmy() {
97103
return new ElfArmy();
98104
}
99105
}
100106

101107
public class OrcKingdomFactory implements KingdomFactory {
108+
109+
@Override
102110
public Castle createCastle() {
103111
return new OrcCastle();
104112
}
113+
114+
@Override
105115
public King createKing() {
106116
return new OrcKing();
107117
}
118+
119+
@Override
108120
public Army createArmy() {
109121
return new OrcArmy();
110122
}

0 commit comments

Comments
 (0)