Activity Diagrams

What is an Activity Diagram?

Well, in short, an activity diagram is a detailed flow chart that maps out all options and routes a piece of code can take involving different decisions and actions that bring the plan of the code together so the final code will work.

Start and End Point circend-circ

The starting point of an activity diagram is defined by a circle and the end is shown by a circle with a ring around it. In an activity diagram, you can have more than one starting point but only one end.

Decisionsdiamond

The decisions shape is usually used with an If statement with two arrows coming out to their respected answers, meaning if you asked the player something simple, like ‘Do you want to pick up an item?’ then there would be two arrows coming out of the decision block one for if the player says yes and another for if the player says no.

Arrowarrow

The arrow is used to show the direction of which the code is running, connecting each action, decision, start and end together to form the overall working plan for the code. The arrow is also used twice with a decision for a yes or no answer taking the code to its respected result.

Action

round-rect

The action shape is all of the potential things that can happen while your code is running through its cycle. Each being an action such as calculating or moving something within the code itself.

You can find out more by reading this PDF:activity-diagrams

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s