0% found this document useful (0 votes)
40 views2 pages

Pseudo2Activity Notes

This document summarizes common pseudocode constructs and their equivalent activity diagram representations. It describes sequence, selection, and repetition structures in pseudocode and how they map to sequential and branching flows in activity diagrams. Selection includes one-way (if-then-else), two-way (if-then), and multi-way (case) structures. Repetition includes while, do-while, for, and unstructured loop constructs. The document provides examples of how each pseudocode construct can be modeled in an activity diagram.

Uploaded by

Bolarinwa Joseph
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views2 pages

Pseudo2Activity Notes

This document summarizes common pseudocode constructs and their equivalent activity diagram representations. It describes sequence, selection, and repetition structures in pseudocode and how they map to sequential and branching flows in activity diagrams. Selection includes one-way (if-then-else), two-way (if-then), and multi-way (case) structures. Repetition includes while, do-while, for, and unstructured loop constructs. The document provides examples of how each pseudocode construct can be modeled in an activity diagram.

Uploaded by

Bolarinwa Joseph
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Coventry University

School of Engineering

Summary of Pseudocode and Equivalent Activity Diagrams


Sequence Sequential control is indicated by writing one action after another. The actions are performed in the order in which they are written. Selection Pseudocode Construct Activity Diagram One-way (Unary) selection if <Boolean exprn = true> then <statement 1> <statement 2> | | <statement n> endif Two-Way (Binary) selection if <Boolean exprn = true> then <statement list 1> else <statement list 2> endif

Multiway selection select case <expression> of case <const condn 1> : <statement list 1> case <const condn 2> : <statement list 2> | | case <const condn n> : <statement list n> else case <default statement list> endselect The if structure can also be extended to multiway selection.

C++\Pseudocode to Activity

Page - 3.1 RJR\Nov2005\pseudo2activity_notes.doc 1998, 2003, 2005 R.J.Rider

Coventry University

School of Engineering

Repetition Pseudocode Construct Activity Diagram Repetition for either zero or indefinite number of times while < Boolean exprn = true > <statement list> endwhile

Repetition for at least once or indefinite number of times do <statement list> while < Boolean exprn = true >

Repetition for either zero or pre-defined number of times for <index> = <expn 1> to <expn 2> <statement list> endfor

Unstructured repetition for indefinite number of times loop <statement list> if < Boolean exprn = true > then exit <statement list> endloop N.B. This loop is not recommended.
C++\Pseudocode to Activity Page - 3.2 RJR\Nov2005\pseudo2activity_notes.doc 1998, 2003, 2005 R.J.Rider

Not included

You might also like