I usually get so confused with UML and this situation is no different. Let's say I have an interface IAnimal, class Food and Cat:
interface IAnimal {
void Feed(Food food);
}
class Cat : IAnimal {
void Feed(Food food) {
//code
}
}
I've got 3 questions about drawing UML class diagram for these 3 elements:
I assume I should use association between IAnimal and Food or Cat and Food. Should there be an arrow on one side of the association line, if yes, then on which side and why there?
if I write Feed as an IAnimal method on diagram, should I write a method Feed inside class Cat or do I write only additional Cat methods?
the most important: should the association be between IAnimal and Food, Cat and Food, or both?