mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-23 18:25:29 +00:00
added abstract-factory sample
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package com.iluwatar;
|
||||
|
||||
public class OrcKingdomFactory implements KingdomFactory {
|
||||
|
||||
public Castle createCastle() {
|
||||
return new OrcCastle();
|
||||
}
|
||||
|
||||
public King createKing() {
|
||||
return new OrcKing();
|
||||
}
|
||||
|
||||
public Army createArmy() {
|
||||
return new OrcArmy();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user