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

  • SEARCH
  • Home
  • 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 6666539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:50:21+00:00 2026-05-26T02:50:21+00:00

Several questions about UML: Do I include the main class in my UML diagram?

  • 0

Several questions about UML:
Do I include the main class in my UML diagram?
If I do include it, and it instantiates objects, do I draw an empty arrow (such as ->) from my main class to the classes it instantiates?
When do I use the diamond vs. the arrow?

I’m just curious about those 3 things… While an article would also be very helpful, could someone address those three questions?

Thank you so much.

  • 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-26T02:50:21+00:00Added an answer on May 26, 2026 at 2:50 am

    Do I include the main class in my UML diagram?

    There are many types of UML diagrams, but I suspect here you mean a class diagram. The answer to your question is literally: if you want to. The beauty of UML is that you can make many diagrams, that vary in detail. Some diagrams will show just a few classes, some many. The idea is that you diagram different parts of the system, at different views, for different audiences. Diagram as much or as little as you like. If you are making a very small application with just a few classes, then it probably will make sense to show the main class. Give it a stereotype or use a comment that identifies it as a “main application class.”

    If I do include it, and it instantiates objects, do I draw an empty arrow (such as ->) from my main class to the classes it instantiates?

    You certainly may, again “if you want to,” There will be a dependency here in a way: the main class “depends on” the other classes because it uses them somehow. That is, if main class A instantiates objects of class B, then class A needs class B to compile, so you may show this as a dependency if you wish.

    When do I use the diamond vs. the arrow?

    The diamond shows aggregation or composition and is used as follows: if class A has a field of class B, then an arrow from A to B with a diamond on the A side is called for. The “plain arrow” just shows a relatively unspecificed dependency. You can use it from class A to class B when class A uses, somehow class B. Perhaps a method of class A uses an instance of class B as a local variable. No containment (composition or aggregation) of a B in an A is implied with the plain dependency.

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

Sidebar

Related Questions

i know there are several questions about regex recursion in .net. I can write
I have several questions about properties displayed in propertyGrid i cant seem to find
I've read several other questions about material in order to learn RoR. But my
I have found several questions asking about template typedefs in C++0x, which are resolved
There have been several questions posted to SO about floating-point representation. For example, the
I have seen several questions with people asking about the same problem but none
I thought about migrating subversion a lot and I have several questions still open.
There have been several questions over the past few days about the proper use
I found several questions about the issue and spend an hour on it, but
I have a several questions about hibernate. In many questions here in stackoverflow, several

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.