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 3340534
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:37:08+00:00 2026-05-18T00:37:08+00:00

This post is actually divided in two questions: Which kinds of associations classes/interfaces usually

  • 0

This post is actually divided in two questions:

Which kinds of associations classes/interfaces usually have?

I’d say there are at least 3 kinds of dependencies:

  • Inheritance : I think we all know this one)
  • Dependency : with this I mean that if class A depends on class B, I can only instantiate class A if I pass it class B as constructor argument. Is this correct?
  • Uses : class A uses class B if there is any kind of reference of class B in the code of class A that is neither inheritance of dependency.

Are these the only kind of associations between classes? Are my interpretations of what they mean correct?

Which kind of dependencies are of our interest to show on UML diagrams (mostly class/package diagrams)?

Up until now, I’ve mostly only put in class diagrams arrows depicting dependencies associations. But now that I think of it, most of the time I look at class diagrams, I’ll find something along the lines of

alt text

where only Inherits and Uses associations are shown. But those Uses in the class diagram aren’t really the same kind of Uses I’ve defined above. They are just a way of telling you there’s a getter on a class of a type that’s not a primitive.

I guess that if I had to look to some system’s documentation I’d like to know how different classes in the system depend on each other. I’d definetely like to have some sort of Dependency Graph to look at.

Would it better to restrict class diagrams to Inherits/Uses associations and then have other diagram/graph that shows Depends/Uses associations?

How do you prefer it, and why?

Thanks

  • 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. Editorial Team
    Editorial Team
    2026-05-18T00:37:08+00:00Added an answer on May 18, 2026 at 12:37 am

    First, you should stop talking about inheritance, depends and uses relationships as “associations”. The word “Association” has a particular meaning in UML; see below.

    Of the three relationships you mentioned, it is conventional to only show the inheritance (technically Generalization) relationships in a class diagram. They are represented using solid lines with open triangle arrowheads.

    If you wanted to show depends / uses relationships between classes, you should use the UML Dependency notation; i.e. a dashed line with a “vee” arrowhead.

    The other kind of relationship that is commonly depicted in an class diagram is an Association; i.e. information-carrying relationships between instances of classes, that are typically represented using (for example) pointers, or database foreign keys / indexes.

    I guess it is a matter of personal preference, but I wouldn’t want to see depends/uses relationships on an object diagram. It is difficult enough to layout the Generalization and Association lines. Other lines are simply going to make the diagram too “busy”.

    The UML User Guide says:

    “Remember that it is both undesirable and unnecessary to model all relationships among a set of abstractions in a single diagram or view. Rather, build up your system’s relationships by considering different views on the system. Highlight interesting sets of relationships in individual diagrams.”

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

Sidebar

Related Questions

No related questions found

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.