Activity Diagram for Stack Overflow

Create some activity diagrams for the Stack Overflow problem.

Activities diagrams are a great way to visualize the flow of messages from one activity to the other in the system. There can be different activity diagrams that we can create for our Stack Overflow system. In this lesson, we will create activity diagrams for the following two activities:

  • A member posting a question

  • Activity challenge: A member closes a question.

A member posting a question

The following are the states and actions that will be involved in this activity diagram.

States

Initial state: The member clicks on the “Ask Question” button.

Final state: There are two final states present in this activity diagram, shown below:

  • The question was successfully posted.

  • The question is not posted.

Actions

The member clicks on the “Ask Question” button and fills in the required fields. The member is then asked if they want to add a tag. After the post is composed, the system checks if the terms of service are followed. The question is posted only if the terms of service are followed.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.