#590 Alter Factory Method presentation

This commit is contained in:
Ilkka Seppälä
2017-08-12 20:02:14 +03:00
parent 002774b5aa
commit 2d750dc0fd
6 changed files with 41 additions and 172 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,117 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<class-diagram version="1.1.8" icons="true" automaticImage="PNG" always-add-relationships="false" generalizations="true"
realizations="true" associations="true" dependencies="false" nesting-relationships="true">
<class id="1" language="java" name="com.iluwatar.factory.method.OrcBlacksmith" project="factory-method"
file="/factory-method/src/main/java/com/iluwatar/factory/method/OrcBlacksmith.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="106" width="280" x="-46" y="239"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<interface id="2" language="java" name="com.iluwatar.factory.method.Blacksmith" project="factory-method"
file="/factory-method/src/main/java/com/iluwatar/factory/method/Blacksmith.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="88" width="280" x="114" y="385"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<enumeration id="3" language="java" name="com.iluwatar.factory.method.WeaponType" project="factory-method"
file="/factory-method/src/main/java/com/iluwatar/factory/method/WeaponType.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="196" width="210" x="793" y="385"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</enumeration>
<class id="4" language="java" name="com.iluwatar.factory.method.OrcWeapon" project="factory-method"
file="/factory-method/src/main/java/com/iluwatar/factory/method/OrcWeapon.java" binary="false" corner="BOTTOM_RIGHT">
<position height="106" width="178" x="806" y="239"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="5" language="java" name="com.iluwatar.factory.method.ElfWeapon" project="factory-method"
file="/factory-method/src/main/java/com/iluwatar/factory/method/ElfWeapon.java" binary="false" corner="BOTTOM_RIGHT">
<position height="106" width="172" x="594" y="239"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<interface id="6" language="java" name="com.iluwatar.factory.method.Weapon" project="factory-method"
file="/factory-method/src/main/java/com/iluwatar/factory/method/Weapon.java" binary="false" corner="BOTTOM_RIGHT">
<position height="70" width="159" x="594" y="385"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<class id="7" language="java" name="com.iluwatar.factory.method.ElfBlacksmith" project="factory-method"
file="/factory-method/src/main/java/com/iluwatar/factory/method/ElfBlacksmith.java" binary="false"
corner="BOTTOM_RIGHT">
<position height="106" width="280" x="274" y="239"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<realization id="8">
<end type="SOURCE" refId="4"/>
<end type="TARGET" refId="6"/>
</realization>
<realization id="9">
<end type="SOURCE" refId="7"/>
<end type="TARGET" refId="2"/>
</realization>
<realization id="10">
<end type="SOURCE" refId="5"/>
<end type="TARGET" refId="6"/>
</realization>
<association id="11">
<end type="SOURCE" refId="4" navigable="false">
<attribute id="12" name="weaponType">
<position height="0" width="0" x="0" y="0"/>
</attribute>
<multiplicity id="13" minimum="0" maximum="1">
<position height="0" width="0" x="0" y="0"/>
</multiplicity>
</end>
<end type="TARGET" refId="3" navigable="true"/>
<display labels="true" multiplicity="true"/>
</association>
<realization id="14">
<end type="SOURCE" refId="1"/>
<end type="TARGET" refId="2"/>
</realization>
<association id="15">
<end type="SOURCE" refId="5" navigable="false">
<attribute id="16" name="weaponType">
<position height="0" width="0" x="0" y="0"/>
</attribute>
<multiplicity id="17" minimum="0" maximum="1">
<position height="0" width="0" x="0" y="0"/>
</multiplicity>
</end>
<end type="TARGET" refId="3" navigable="true"/>
<display labels="true" multiplicity="true"/>
</association>
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</classifier-display>
<association-display labels="true" multiplicity="true"/>
</class-diagram>

View File

@ -1,54 +0,0 @@
@startuml
package com.iluwatar.factory.method {
class App {
- LOGGER : Logger {static}
- blacksmith : Blacksmith
+ App(blacksmith : Blacksmith)
+ main(args : String[]) {static}
- manufactureWeapons()
}
interface Blacksmith {
+ manufactureWeapon(WeaponType) : Weapon {abstract}
}
class ElfBlacksmith {
+ ElfBlacksmith()
+ manufactureWeapon(weaponType : WeaponType) : Weapon
}
class ElfWeapon {
- weaponType : WeaponType
+ ElfWeapon(weaponType : WeaponType)
+ getWeaponType() : WeaponType
+ toString() : String
}
class OrcBlacksmith {
+ OrcBlacksmith()
+ manufactureWeapon(weaponType : WeaponType) : Weapon
}
class OrcWeapon {
- weaponType : WeaponType
+ OrcWeapon(weaponType : WeaponType)
+ getWeaponType() : WeaponType
+ toString() : String
}
interface Weapon {
+ getWeaponType() : WeaponType {abstract}
}
enum WeaponType {
+ AXE {static}
+ SHORT_SWORD {static}
+ SPEAR {static}
+ UNDEFINED {static}
- title : String
+ toString() : String
+ valueOf(name : String) : WeaponType {static}
+ values() : WeaponType[] {static}
}
}
ElfWeapon --> "-weaponType" WeaponType
OrcWeapon --> "-weaponType" WeaponType
App --> "-blacksmith" Blacksmith
ElfBlacksmith ..|> Blacksmith
ElfWeapon ..|> Weapon
OrcBlacksmith ..|> Blacksmith
OrcWeapon ..|> Weapon
@enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB