My text editor has three classes which are Buffer
, Command
and CommandInterpreter
. Buffer and Command are oriented object classes but CommandInterpreter
contains only static method and is used to create an instance of Command and to execute these command.
My question is should I represent CommandInterpreter
on my classes' diagram or should I just represent Command
and Buffer
since CommandInterpreter
contains only static method?
Thanks in advance!
It depends what you want to show with your UML
CommandInterpreter
is not needed)CommandInterpreter
because otherwise something is missing)I would prefer to add the CommandInterpreter
(maybe with a short note as description). Also the stereotype <<utility>>
can be used for classes which have only static methods.