diff --git a/abstract-factory/README.md b/abstract-factory/README.md
index f153c1202..c049401fc 100644
--- a/abstract-factory/README.md
+++ b/abstract-factory/README.md
@@ -18,7 +18,107 @@ Kit
Provide an interface for creating families of related or dependent
objects without specifying their concrete classes.
-
+## Explanation
+Real world example
+
+> To create a kingdom we need objects with common theme. Elven kingdom needs an Elven king, Elven castle and Elven army whereas Orcish kingdom needs an Orcish king, Orcish castle and Orcish army. There is a dependency between the objects in the kingdom.
+
+In plain words
+
+> A factory of factories; a factory that groups the individual but related/dependent factories together without specifying their concrete classes.
+
+Wikipedia says
+
+> The abstract factory pattern provides a way to encapsulate a group of individual factories that have a common theme without specifying their concrete classes
+
+**Programmatic Example**
+
+Translating the kingdom example above. First of all we have some interfaces and implementation for the objects in the kingdom
+
+```
+public interface Castle {
+ String getDescription();
+}
+public interface King {
+ String getDescription();
+}
+public interface Army {
+ String getDescription();
+}
+
+// Elven implementations ->
+public class ElfCastle implements Castle {
+ static final String DESCRIPTION = "This is the Elven castle!";
+ @Override
+ public String getDescription() {
+ return DESCRIPTION;
+ }
+}
+public class ElfKing implements King {
+ static final String DESCRIPTION = "This is the Elven king!";
+ @Override
+ public String getDescription() {
+ return DESCRIPTION;
+ }
+}
+public class ElfArmy implements Army {
+ static final String DESCRIPTION = "This is the Elven Army!";
+ @Override
+ public String getDescription() {
+ return DESCRIPTION;
+ }
+}
+
+// Orcish implementations similarly...
+
+```
+
+Then we have the abstraction and implementations for the kingdom factory
+
+```
+public interface KingdomFactory {
+ Castle createCastle();
+ King createKing();
+ Army createArmy();
+}
+
+public class ElfKingdomFactory implements KingdomFactory {
+ public Castle createCastle() {
+ return new ElfCastle();
+ }
+ public King createKing() {
+ return new ElfKing();
+ }
+ public Army createArmy() {
+ return new ElfArmy();
+ }
+}
+
+public class OrcKingdomFactory implements KingdomFactory {
+ public Castle createCastle() {
+ return new OrcCastle();
+ }
+ public King createKing() {
+ return new OrcKing();
+ }
+ public Army createArmy() {
+ return new OrcArmy();
+ }
+}
+```
+
+Now we have our abstract factory that lets us make family of related objects i.e. Elven kingdom factory creates Elven castle, king and army etc.
+
+```
+KingdomFactory factory = new ElfKingdomFactory();
+Castle castle = factory.createCastle();
+King king = factory.createKing();
+Army army = factory.createArmy();
+
+castle.getDescription(); // Output: This is the Elven castle!
+king.getDescription(); // Output: This is the Elven king!
+army.getDescription(); // Output: This is the Elven Army!
+```
## Applicability
Use the Abstract Factory pattern when
@@ -41,9 +141,6 @@ Use the Abstract Factory pattern when
* Dependency injection in java hides the service class dependencies that can lead to runtime errors that would have been caught at compile time.
-
-
-
## Real world examples
* [javax.xml.parsers.DocumentBuilderFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/parsers/DocumentBuilderFactory.html)
diff --git a/abstract-factory/etc/abstract-factory.png b/abstract-factory/etc/abstract-factory.png
deleted file mode 100644
index c709276b6..000000000
Binary files a/abstract-factory/etc/abstract-factory.png and /dev/null differ
diff --git a/abstract-factory/etc/abstract-factory.ucls b/abstract-factory/etc/abstract-factory.ucls
deleted file mode 100644
index bdf1e1510..000000000
--- a/abstract-factory/etc/abstract-factory.ucls
+++ /dev/null
@@ -1,159 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/abstract-factory/etc/abstract-factory.urm.puml b/abstract-factory/etc/abstract-factory.urm.puml
deleted file mode 100644
index 7b5e1b701..000000000
--- a/abstract-factory/etc/abstract-factory.urm.puml
+++ /dev/null
@@ -1,89 +0,0 @@
-@startuml
-package com.iluwatar.abstractfactory {
- class App {
- - LOGGER : Logger {static}
- - army : Army
- - castle : Castle
- - king : King
- + App()
- + createKingdom(factory : KingdomFactory)
- + getArmy() : Army
- ~ getArmy(factory : KingdomFactory) : Army
- + getCastle() : Castle
- ~ getCastle(factory : KingdomFactory) : Castle
- + getKing() : King
- ~ getKing(factory : KingdomFactory) : King
- + main(args : String[]) {static}
- - setArmy(army : Army)
- - setCastle(castle : Castle)
- - setKing(king : King)
- }
- interface Army {
- + getDescription() : String {abstract}
- }
- interface Castle {
- + getDescription() : String {abstract}
- }
- class ElfArmy {
- ~ DESCRIPTION : String {static}
- + ElfArmy()
- + getDescription() : String
- }
- class ElfCastle {
- ~ DESCRIPTION : String {static}
- + ElfCastle()
- + getDescription() : String
- }
- class ElfKing {
- ~ DESCRIPTION : String {static}
- + ElfKing()
- + getDescription() : String
- }
- class ElfKingdomFactory {
- + ElfKingdomFactory()
- + createArmy() : Army
- + createCastle() : Castle
- + createKing() : King
- }
- interface King {
- + getDescription() : String {abstract}
- }
- interface KingdomFactory {
- + createArmy() : Army {abstract}
- + createCastle() : Castle {abstract}
- + createKing() : King {abstract}
- }
- class OrcArmy {
- ~ DESCRIPTION : String {static}
- + OrcArmy()
- + getDescription() : String
- }
- class OrcCastle {
- ~ DESCRIPTION : String {static}
- + OrcCastle()
- + getDescription() : String
- }
- class OrcKing {
- ~ DESCRIPTION : String {static}
- + OrcKing()
- + getDescription() : String
- }
- class OrcKingdomFactory {
- + OrcKingdomFactory()
- + createArmy() : Army
- + createCastle() : Castle
- + createKing() : King
- }
-}
-App --> "-castle" Castle
-App --> "-king" King
-App --> "-army" Army
-ElfArmy ..|> Army
-ElfCastle ..|> Castle
-ElfKing ..|> King
-ElfKingdomFactory ..|> KingdomFactory
-OrcArmy ..|> Army
-OrcCastle ..|> Castle
-OrcKing ..|> King
-OrcKingdomFactory ..|> KingdomFactory
-@enduml
\ No newline at end of file
diff --git a/abstract-factory/etc/abstract-factory_1.png b/abstract-factory/etc/abstract-factory_1.png
deleted file mode 100644
index 5990edd83..000000000
Binary files a/abstract-factory/etc/abstract-factory_1.png and /dev/null differ
diff --git a/pom.xml b/pom.xml
index 7f96043f5..79bb7e533 100644
--- a/pom.xml
+++ b/pom.xml
@@ -462,6 +462,7 @@
java-design-patterns
singleton
factory-method
+ abstract-factory