I have three devices which have different Run()
implementations and interfaces. These devices may contain other subsystem or may contain other devices.
I know that I should use Template and Composite pattern. but in template pattern I need to inherit device1 device2 and device3 from device class. On the other hand, in Composite pattern I have device, CompositeDevice and subsystem classes.
I am quite confused about combining these two patterns. Any suggestions ?