added factory method sample
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
package com.iluwatar;
|
||||
|
||||
public class OrcBlacksmith implements Blacksmith {
|
||||
|
||||
public Weapon manufactureWeapon(WeaponType weaponType) {
|
||||
return new OrcWeapon(weaponType);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user