Please enable JavaScript.
Coggle requires JavaScript to display documents.
Design pattern, Door, Interview askQuestion(), Hiring makeInterview() :…
Design pattern
Simple Factory
Factory Method
Abtract Factory
Door
WoodenDoor
IronDoor
Interview
askQuestion()
Developer
Tester
Hiring
makeInterview() : Interview
fun takeInterview()
this.makeInterview().askQuestion()
DeveloperExpert
TesterExpert
Door
WoodenDoor
IronDoor
Expert
Welder
Carpenter
FittingDoor
fun makeDoor() : Door
fun makeFittingExpert() : Expert
IronDoorFactory
return IronDoor()
return Welder()
WoodenDoorFactory
return WoodenDoor()
return Carpenter()
DoorFactory
fun makeDoor(width:Int, height:Int ): Door
return WoodenDoor()