Tag Info

New answers tagged

0

One thing you can do if you want to add a property to only a few of the subclasses is to use another interface. In your example: Navigation -> AmountEnabledNavigation -> C3, but Navigation -> C1. In the code that handles the objects, e.g. adds the amounts, you can simply check if the object inherits from AmountEnabledNavigation and then decide based on that. ...



Top 50 recent answers are included