Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why Use Interfaces
Message
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01278205
Message ID:
01279566
Views:
47
> but if I had a choice I'd do the original design so that it avoids MI.

Do you always have the choice (even with hindsight)?
Assume these four entities (with the methods they need to implement):

Person
:FeedMe
:WaterMe

Cow
:FeedMe
:WaterMe
:EatMe

Cake
:EatMe

Deadly Nightshade
:WaterMe

What will be your class structure?
Given a collection of such objects how do you know which are edible?
What if the calling entity is sometimes a vegetarian?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform