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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:49:07+00:00 2026-05-20T00:49:07+00:00

What is the best way to describe a commenting and voting process as we

  • 0

What is the best way to describe a commenting and voting process as we have it here on SO in UML? I need a clear way to describe that one user asks a question, multiple users submit answers and each user can upvote / downvote answers and the question as he likes.

I tried to model that using an activity diagram that starts on top, has to branches, one branch that goes to a node that says “comment”, the other one goes in a “voting” action. Each action then has a flow to itself (representing that the user can upvote / downvote and comment as often as he wants) and then both join in a final node.

I do not think that this is in any way comprehensible so I want to ask: what is the correct way to describe this using UML?

  • 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-20T00:49:07+00:00Added an answer on May 20, 2026 at 12:49 am

    If you want to describe the rules (i.e. relationships) then a class diagram is probably more appropriate than an activity diagram. Here’s a pretty crude but nevertheless representative example:
    class diagram: question-answer-vote

    Activity diagrams are appropriate for describing chained activities (processes). In this case however, the behaviour is pretty simple; a User can submit Posts (Question or Answer) and also vote on Posts.

    The diagram captures the following rules (reading directly from the relationships):

    Each User may submit many Posts
    A User need not submit any Posts
    Each Post must be submitted by exactly one User
    Each User may vote on many Posts
    A User need not vote on any Posts
    Each Post may be voted on by many Users
    A Post need not be voted on by any Users
    Each Vote has a type which is either up or down
    A Post is either a Question or an Answer
    A Question may have many Answers
    A Question need not have any Answers
    Each Answer must be a response to exactly one Question
    

    Note the model is missing some important rules (e.g. can’t up/down vote your own posts). Also missing Comments (another subtype of Post) and other salient attributes (e.g. User name, Post text, etc.). Hopefully representative enough for purpose though.

    hth.

    PS: I took liberties with syntax for Vote.type. It should really be defined as an enumeration, but for these purposes the way it’s shown is sufficient. Apologies to any lurking UML police 🙂

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

Sidebar

Related Questions

Unsure of the best way to describe this, but I need to calculate the
Okay I'll try describe this the best way I can. I have a chat
I suppose the best way to describe the control, that I'm trying to make,
I'm not sure the best way to describe what it is that I'm trying
Best way to describe this is explain the situation. Imagine I have a factory
Ok. So the title sounds confusing but that's probably the best way to describe
The best way of describing this is I have a table of people with
Which is the best way to implement factory method. 1) A factory method that
What would be the best way to accomplish something like this? Suppose I have
The best way to describe the issue would be by posting a jsFiddle, so

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.