Quantcast
Channel: Design pattern help - Stack Overflow
Browsing latest articles
Browse All 5 View Live

Answer by Abdur Rahman for Design pattern help

If you are seeking for a design pattern, then I suggest you strategy pattern.Because Implementing this pattern you can dynamically interchange the components of robot.

View Article



Answer by Rich Schuler for Design pattern help

The design patterns I'd probably go with for such a problem are: Dependency Injection and a framework to go with it, the Composite pattern, and the Builder pattern. They should basically let you...

View Article

Answer by Andrey Adamovich for Design pattern help

I think your robot should have a list of ports i.e. a number of injected components each robot may have. Your Robot class will be a container of RobotParts. You can have specific parts to have specific...

View Article

Answer by Francis Upton IV for Design pattern help

I'm not a Python guy, but a quick look indicates they support multiple inheritance which can be used like Java Interfaces (Python does not seem to support interfaces). So you can have essentially...

View Article

Design pattern help

I have some algorithms to do that are very similar in very aspects but are all different. I'll try to give an example of what I mean.Let's assume I have a Robot class. This class should be the "base"...

View Article

Browsing latest articles
Browse All 5 View Live




Latest Images