Skip to main content

All Questions

2 votes
1 answer
334 views

Composition or Inheritance for classes with almost similar implementations but different input and outputs for methods?

I have the following classes, which have quite similar method implementations. Only the classes' method inputs and outputs seem to be of different types. When I put it like this, it sounds like a case ...
AnOldSoul's user avatar
  • 173
1 vote
1 answer
339 views

Best pattern to solve problem where objects only differ in one attribute

As I am maintaining and extend a software system in Java, I saw a colleague (who left due to retirement) implementing a table with a generic approach. This approach is unluckily bound to tables (ui-...
J-P's user avatar
  • 37
3 votes
2 answers
716 views

Correct way to extend a hierarchy tree

I have the following tree currently to be implemented in Java. My problems are the following: How can I go about addressing the fact Admin needs to have all tier 4 logic from both branches of the ...
Leon's user avatar
  • 207