diff --git a/simple-factory/etc/simple-factory.urm.puml b/simple-factory/etc/simple-factory.urm.puml new file mode 100644 index 000000000..77fee4b5b --- /dev/null +++ b/simple-factory/etc/simple-factory.urm.puml @@ -0,0 +1,35 @@ +@startuml +package com.iluwatar.simplefactory { + class App { + - LOGGER : Logger {static} + + App() + + main(args : String[]) {static} + } + interface Car { + + getDescription() : String {abstract} + } + class CarSimpleFactory { + + CarSimpleFactory() + + getCar(type : CarType) : Car {static} + } + ~enum CarType { + + FERRARI {static} + + FORD {static} + + valueOf(name : String) : CarType {static} + + values() : CarType[] {static} + } + class Ferrari { + ~ DESCRIPTION : String {static} + + Ferrari() + + getDescription() : String + } + class Ford { + ~ DESCRIPTION : String {static} + + Ford() + + getDescription() : String + } +} +CarType ..+ CarSimpleFactory +Ferrari ..|> Car +Ford ..|> Car +@enduml \ No newline at end of file diff --git a/simple-factory/pom.xml b/simple-factory/pom.xml index e7d28511f..ca7c0547d 100644 --- a/simple-factory/pom.xml +++ b/simple-factory/pom.xml @@ -6,6 +6,17 @@ 1.24.0-SNAPSHOT simple-factory + + + org.junit.jupiter + junit-jupiter-engine + test + + + junit + junit + +