This is I suppose something covered by a best practice, so I would like to hear what people think.
If I have an instance that implements an interface, but does not need to implement all of the methods, is it better to return a value or throw an exception.
For example, if I had an interface building, and two concrete classes, House and Shed. The method getGarageSize would possibly be meaningful for House, but definitely not for Shed. So would it be better for getGarageSize to return null or throw an Exception.
This situation may arise because the interface is poorly designed, but say you want to add functionality to a codebase, and not modify the existing APIs.
Thanks, -John K
- - - - - - - - - - - - - - - - - - - - - - - Jakarta Commons CLI http://jakarta.apache.org/commons/cli
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
