@albertoblaz: Yes, absolutely. LSP, summed up, really says "if Y subclasses/implements X, be sure that Y is really an X". In your case, Y is a Wall. If it implements IMovable, it breaks LSP because it's not movable. You get into more complex debates like whether a Square is a Rectangle (technically yes, programmatically no), but you're still in easily-defined territory here. – pdr May 24 '13 at 9:14http://programmers.stackexchange.com/questions/199218/is-it-good-to-have-an-interface-plenty-of-methods-which-belong-to-different-conc?rq=1
No comments:
Post a Comment