Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 103645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:09:23+00:00 2026-05-11T01:09:23+00:00

I usually get so confused with UML and this situation is no different. Let’s

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:09:24+00:00Added an answer on May 11, 2026 at 1:09 am

    UML defines a number of relationship types.

    Relationships have a number of different notations:

    • Association relationships have a base notation of a solid path
    • Dependency relationships have a base notation of a dashed arrow
    • Generalization relationships have a base notation of a solid path with a triangular arrowhead
    • Realization relationships have a base notation of a dashed arrow with a triangular arrowhead (a mix of dependency and generalization)

    Pictorially

    +---------------------------+ |       <<interface>>       | |           IAnimal         | +---------------------------+                        +--------+ | + Feed(food: Food) : void |- - - - <<use>> - - - ->|  Food  | +---------------------------+                        +--------+               ^              /_\               |                |                |         +-----------+         |    Cat    |         +-----------+ 

    That is:

    • The relationship between IAnimal and Food is a usage relationship. This is shown as a dependency with the stereotype «use»
    • The relationship between IAnimal and Cat is a realization relationship.

    Association relationships are used to indicate connections between two or more classifiers. This implies that at least one of the classes has an attribute of the other type (or a collection). In fact, attributes and association ends contain the same information and can be interchanged.

    So, IMHO, the relationships you describe should not be modelled as associations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got a core that looks very different from the ones I usually get
I don't usually get involved with MDX if I dont have to, but.... I
I enjoy programming, usually. Tedious stuff is easy to get done as quickly and
As I use the web, I regularly get runtime errors (usually javascript) being reported
Usually when I need to fork in C, I do something like this: pid_t
In my c# applications I usually get the version (to show the customer) using
Usually when I'm creating indexes on tables, I generally guess what the Fill Factor
Usually Flash and Flex applications are embedded on in HTML using either a combination
Usually when I build a site, I put all the CSS into one file,
Usually, we install VS.NET on our production server, to solve problems easily with our

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.