If I have a Vehicle class that has 3 subclasses, but only 2 of the subclasses use the enum public enum EngineTypes {PETROL, DIESEL, ELECTRIC, UNKNOWN} where should i declare my Enum? In Vehicle or in each of the 2 subclasses, so I am declaring it 2 times.
If say Vehicle declare that enum, how should i draw it in the UML diagram, the 2 subclasses would have a composition relationship with the enum as they uses them as attribute, but what relationship does Vehicle has with the enum? Since it only handles the declaration.