Relative Content

Tag Archive for object-oriented-design

Is this a Single Responsibility Principle violation?

I’m designing an OO graph library and at the moment I’m trying to figure out the design for a GraphEdge class. I’ve added setters and getters for it’s nodes, direction and weight. This seemes perfectly reasonable.

Is this a Single Responsibility Principle violation?

I’m designing an OO graph library and at the moment I’m trying to figure out the design for a GraphEdge class. I’ve added setters and getters for it’s nodes, direction and weight. This seemes perfectly reasonable.

OO – are large classes acceptable? [duplicate]

This question already has answers here: How would you know if you’ve written readable and easily maintainable code? [closed] (19 answers) Closed 11 years ago. Despite many years in IT, I still struggle with OO design. One particular problem I seem to keep ending up with is large classes, often containing many hundreds of lines […]

How to organise OO code [duplicate]

This question already has answers here: using static methods and classes (4 answers) Closed 11 years ago. If you have a method that doesn’t need access to any non public fields, properties or methods where should you put the method ? should it just be a normal method in the class, a static method that […]

How to organise OO code [duplicate]

This question already has answers here: using static methods and classes (4 answers) Closed 11 years ago. If you have a method that doesn’t need access to any non public fields, properties or methods where should you put the method ? should it just be a normal method in the class, a static method that […]