How can I avoid breaking Liskov Substitution Principle (LSP)?
问题 I am in a situation very similar to what Steve McConnell's in Code Complete has mentioned . Only that my problem is based of Vehicles and Trike happens to be on that by law falls in the category of Cars . Cars had four wheels until now . Any way my domain is unnecessarily complex so it is easy to stick with cats example below. Be suspicious of classes that override a routine and do nothing inside the derived routine This typically indicates an error in the design of the base class. For