Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 2
    The Liskov Substitution Principle is about being able to substitute a descendant with its ancestor, ie not negating/disabling the ancestor's behavior in a descendant. Your setWidth problem has nothing to do with that. what you need is something like Delphi's method resolution for interfaces which enables you to have two separate setWidth methods: one for each interface. Helps to keep the logic for both interface implementations separate as well. No idea though how to do that in Java... Commented Sep 5, 2013 at 21:26
  • For a square table, the width is from 0 to 1000. That is your new constraint. It's not pretty because the design needs to be redone to better solve the problem. Commented Sep 6, 2013 at 5:10