SlideShare una empresa de Scribd logo
1 de 7
Descargar para leer sin conexión
Advance Software Engineering                                                          UML Diagram


                                                   LAB # 05


Objective:
    •    To understand Activity Diagram.


The Activity Diagram
The purpose of the activity diagram is to model the procedural flow of actions that are part of a
larger activity. In projects in which use cases are present, activity diagrams can model a specific
use case at a more detailed level. However, activity diagrams can be used independently of use
cases for modeling a business-level function, it models procedural flow, the activity diagram
focuses on the action sequence of execution and the conditions that trigger or guard those
actions. The activity diagram is also focused only on the activity's internal actions and not on the
actions that call the activity in their process flow or that trigger the activity according to some
event.
Although UML sequence diagrams can protray the same information as activity diagrams, but
activity diagrams show all potential sequence flows in an activity, whereas a sequence diagram
typically shows only one flow of an activity.

The basics
Consider the action element in an activity diagram, whose official UML name is action state. An
action is indicated on the activity diagram by a "capsule" shape. The text inside it indicates the
action (e.g., Customer Calls Ticket Office or Registration Office Opens).
Figure 1: A sample action that is part of an activity diagram.



Because activity diagrams show a sequence of actions, they must indicate the starting point of
the sequence. The initial state is drawn as a solid circle with a transition line (arrow) that
connects it to the first action in the activity's sequence of actions. Figure 2 shows what an
activity diagram's initial state looks like.




It is important to note that there can be only one initial state on an activity diagram and only one

                                                                                                  1
Advance Software Engineering                                                             UML Diagram


transition line connecting the initial state to an action. Although it may seem obvious that an
activity can have only one initial state, there are certain circumstances -- namely, the
commencement of asynchronous action sequences -- that may suggest that a new initial state
should be indicated in the activity diagram. UML does not allow this. Figure 3 offers an example
of an incorrect activity diagram, because the initial state has two transition lines that point to two
activities.
Figure 3: Incorrect rendering of an initial state within an activity
diagram. The initial state can indicate only ONE action.




The activity's flow terminates when the transition line of the last action in the sequence connects
to a "final state" symbol, which is a bullseye (a circle surrounding a smaller solid circle).

Beyond the basics
Activities modeled for real software development projects include decision points that control
what actions take place. And sometimes activities have parallel actions.


Decision points
Typically, decisions need to be made throughout an activity, depending on the outcome of a
specific prior action. In creating the activity diagram for such cases, you might need to model
two or more different sequences of actions. The UML specification provides two ways to model
decisions like this. The first way is to show a single transition line coming out of an action and
connecting to a decision point. The UML specification name for a decision point is decision, and
it is drawn as a diamond on an activity diagram. Since a decision will have at least two different
outcomes, the decision symbol will have multiple
transition lines connecting to different actions. Figure 5
shows a fragment of a sample activity diagram with a
decision.


Figure 5: A decision point models a choice that must be made
within the sequence of actions.




                                                                                                     2
Advance Software Engineering                                                          UML Diagram


As shown in Figure 5, each transition line involved in a decision point must be labeled with text
above it to indicate "guard conditions," commonly abbreviated as guards. Guard condition text is
always placed in brackets -- for example, [guard condition text]. A guard condition explicitly
tells when to follow a transition line to the next action. According to the decision point shown in
Figure 5, a bartender (user) only needs to "make sure the customer is at least 21 years old" when
the customer orders an alcoholic drink. If the customer orders any other type of drink (the "else"
condition), then the bartender simply gets the drink for the customer. The [else] guard is
commonly used in activity diagrams to mean "if none of the other guarded transition lines
matches the actual condition," then follow the [else] transition line.


Merge points
Sometimes the procedural flow from one decision path may connect back to another decision
path, as shown in Figure 6 at the "Customer's Age > = 21" condition. In these cases, we connect
two or more action paths together using the same diamond icon with multiple paths pointing to
it, but with only one transition line coming out of it. This does not indicate a decision point, but
rather a merge.
Figure 6 shows the same decision as in Figure 5, but Figure 6 expands the activity diagram.
Performing a check of the customer's age leads the user to a second decision: If the customer is
younger than 21, the bartender must tell the customer to order another non-alcoholic drink,
which takes our sequence back to the action "Customer Orders Drink." However, if the customer
is 21 years old or older, then our action sequence takes take us to the same action the bartender
would follow if the person had ordered a non-alcoholic drink: "Get Drink For Customer."

Figure 6: A partial activity diagram, showing
two decision points
("Drink is alcoholic" and "Customer's age <
21") and one merge
("else" and "Customer's age >= 21")




                                                                                                  3
Advance Software Engineering                                                                        UML Diagram



Synch states for asynchronous actions
When modeling activities, you sometimes need to show that certain action sequences can be
done in parallel, or asynchronously. A special notation element allows you to show parallel
action sequences, or synch states. To be clear, a synch state that forks actions into two or more
threads represents a de-synchronizing of the flow (asynchronous actions), and a synch state that
joins actions back together represents a return to synchronized flow. A synch state is drawn as a
thick, solid line with transition lines coming into it from the left (usually) and out of it on the
right (usually). To draw a synch state that forks the action sequence into multiple threads, first
connect a transition line from the action preceding the parallel sequence to the synch state. Then
draw two transition lines coming out of the synch state, each connecting to its own action. Figure
9 is an activity diagram fragment that shows the forking of execution modeled.



                                            Figure 9: A thick, solid line indicates a synch state, allowing two or
                                            more action sequences to proceed in parallel.




                                                                                                                     4
Advance Software Engineering                                                           UML Diagram


Swim lanes
In activity diagrams, it is often useful to model the activity's procedural flow of control between
the objects (persons, organizations, or other responsible entities) that actually execute the action.
To do this, you can add swim lanes to the activity diagram (swim lanes are named for their
resemblance to the straight-line boundaries between two or more competitors at a swim meet).
To put swim lanes on an activity diagram, use vertical columns. For each object that executes
one or more actions, assign a column its name, placed at the top of the column. Then place each
action associated with an object in that object's swim
lane. Figure 12 shows that two objects execute actions
(e.g., Band Manager and Reporting Tool). The Band
Manager object executes the "Selects the View Sales For
My Band Report" action, and the Reporting Tool
executes the "Retrieve Bands the Band Manager
Manages" action. It is important to note that, although
using swimlanes improves the clarity of an activity
diagram (since all the activities are placed in the
swimlanes of their respective executor objects), all the previously mentioned rules governing
activity diagrams still hold true. In other words, you read the activity diagram just like you would
if no swimlanes were used.




                                                                                                   5
Advance Software Engineering                                                                              UML Diagram


                                          Task TO Be Performed……


Task # 01 : When I order Chinese food for delivery, I call the Chinese food delivery guy, give him

my phone number, and his computer will automatically display my address if I've ordered food
before. But if I'm a new customer calling for the first time, he must get my address before he
takes my order.


Task# 02 : Below an activity diagram is shown. Give an interpretation of the diagram.




Task# 03 : Eastern State University (ESU) Background
The ESU course registration problem will be used as an example throughout this book. The process of assigning
professors to courses and the registration of students is a frustrating and time consuming experience. After the
professors of ESU have decided which courses they are going to teach for the semester, the Registrar's office enters
the information into the computer system. A batch report is printed for the professors indicating which courses they
will teach. A course catalog is printed and distributed to the students. The students currently fill out (mulitpart,
multicolor) registration forms that indicate their choice in courses, and return the completed forms to the Registrar's
office. The typical student load is four courses. The staff of the Registrar's office then enters the students' forms into
the mainframe computer system. Once the students' curriculum for the semester has been entered, a batch job is run
overnight to assign students to courses. Most of the time the students get their first choice; however, in those cases
where there is a conflict, the Registrar's office talks with each student to get additional choices. Once all the students
have been successfully assigned to courses, a hard copy of the students' schedule is sent to the students for their




                                                                                                                        6
Advance Software Engineering                                                                          UML Diagram


verification. Most student registrations are processed within a week, but some exceptional cases take up to two
weeks to solve. Once the initial registration period is completed, professors receive a student roster for each course
they are scheduled to teach. Draw an activity diagram for the senerio described above.


Task # 04 Draw an activity diagram models the business process of enrolling in a university, takes this approach. A
student gets enrolled in the university if the form filled is correct otherwise a help system is available. If student
successfully get enrolled in the university he/she can attend classes can enrolled in the seminar committee and need
to pay library fee as well.


Task # 05 Create an activity diagram describing the process of a person (user) using the machine to buy a ticket
from Hamburg to Lübeck. Actually, the machine only takes coins (no credit cards, debit cards).


Task # 06 Create a sequence diagram for the following collaboration. Use the classes and methods on the next slide.
A customer wants to draw money from his bank account. He enters his card into an ATM (automated teller
machine). The ATM machine prompts „Enter PIN“. The customer enters his PIN. The ATM (internally) retrieves
the bank account number from the card. The ATM encrypts the PIN and the account number and sends it over to the
bank. The bank verifies the encrypted Account and PIN number. If the PIN number is correct, the ATM displays
„Enter amount“, draws money from the bank account and pays out the amount.(Use Swimlanes)




                                                                                                                    7

Más contenido relacionado

La actualidad más candente

Interaction Modeling
Interaction ModelingInteraction Modeling
Interaction ModelingHemant Sharma
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramNikhil Pandit
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to umlTony Huynh
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagramsbarney92
 
An Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsAn Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsMohammed Misbhauddin
 
Intro to UML 2
Intro to UML 2Intro to UML 2
Intro to UML 2rchakra
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsAmr E. Mohamed
 
3. use cases
3. use cases3. use cases
3. use casesAPU
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction DiagramNiloy Rocker
 
SAD11 - Sequence Diagrams
SAD11 - Sequence DiagramsSAD11 - Sequence Diagrams
SAD11 - Sequence DiagramsMichael Heron
 
Interaction overview and Profile UML Diagrams
Interaction overview and Profile UML DiagramsInteraction overview and Profile UML Diagrams
Interaction overview and Profile UML DiagramsHusnain Safdar
 

La actualidad más candente (20)

Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Interaction Modeling
Interaction ModelingInteraction Modeling
Interaction Modeling
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to uml
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
An Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsAn Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence Diagrams
 
Intro to UML 2
Intro to UML 2Intro to UML 2
Intro to UML 2
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour Diagrams
 
Interaction overview & Timing diagram
Interaction overview & Timing diagramInteraction overview & Timing diagram
Interaction overview & Timing diagram
 
Lab 2
Lab 2Lab 2
Lab 2
 
3. use cases
3. use cases3. use cases
3. use cases
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
 
SAD11 - Sequence Diagrams
SAD11 - Sequence DiagramsSAD11 - Sequence Diagrams
SAD11 - Sequence Diagrams
 
Uml
UmlUml
Uml
 
UML
UMLUML
UML
 
Interaction overview and Profile UML Diagrams
Interaction overview and Profile UML DiagramsInteraction overview and Profile UML Diagrams
Interaction overview and Profile UML Diagrams
 
Uml 9
Uml 9Uml 9
Uml 9
 
UML
UMLUML
UML
 
Uml2
Uml2Uml2
Uml2
 

Destacado (6)

[0201699613]visual modeling with rational rose 2000 and uml
[0201699613]visual modeling with rational rose 2000 and uml[0201699613]visual modeling with rational rose 2000 and uml
[0201699613]visual modeling with rational rose 2000 and uml
 
Guidance 2010 ada_standards_prt
Guidance 2010 ada_standards_prtGuidance 2010 ada_standards_prt
Guidance 2010 ada_standards_prt
 
Ada Power Point by Jessica Gorman, NCIDQ
Ada Power Point by Jessica Gorman, NCIDQAda Power Point by Jessica Gorman, NCIDQ
Ada Power Point by Jessica Gorman, NCIDQ
 
Dumb & Deaf School
Dumb & Deaf SchoolDumb & Deaf School
Dumb & Deaf School
 
State diagram railway reservation system
State diagram railway reservation systemState diagram railway reservation system
State diagram railway reservation system
 
Handicap care
Handicap careHandicap care
Handicap care
 

Similar a Lab # 05

software engineering with uml- activity diagram
software engineering with uml- activity diagramsoftware engineering with uml- activity diagram
software engineering with uml- activity diagramrahmantoyuri
 
Activity diagram model
Activity diagram modelActivity diagram model
Activity diagram modelahmed zewita
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering Madhar Khan Pathan
 
Use Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling NotationUse Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling NotationLeslie Munday
 
Activity Diagram
Activity DiagramActivity Diagram
Activity DiagramAshesh R
 
SAD09 - Activity Diagrams
SAD09 - Activity DiagramsSAD09 - Activity Diagrams
SAD09 - Activity DiagramsMichael Heron
 
ACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptxACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptxdevboris1
 
Activity Diagram Examples by Creately
Activity Diagram Examples by Creately Activity Diagram Examples by Creately
Activity Diagram Examples by Creately Creately
 
Lecture 19...unit 3.....se
Lecture 19...unit 3.....seLecture 19...unit 3.....se
Lecture 19...unit 3.....sePraveen Nelapati
 
A Suite of Metrics for UML Behavioral Diagrams based on Complexity Perspectives
A Suite of Metrics for UML Behavioral Diagrams based on Complexity PerspectivesA Suite of Metrics for UML Behavioral Diagrams based on Complexity Perspectives
A Suite of Metrics for UML Behavioral Diagrams based on Complexity Perspectivessebastianku31
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagramsMir Majid
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSAshita Agrawal
 
Case tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick RajaCase tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick RajaursKarthick Raja
 
Introduction tobpmn 15 02
Introduction tobpmn 15 02Introduction tobpmn 15 02
Introduction tobpmn 15 02gtiprotec
 

Similar a Lab # 05 (20)

software engineering with uml- activity diagram
software engineering with uml- activity diagramsoftware engineering with uml- activity diagram
software engineering with uml- activity diagram
 
Activity Diagram part8
Activity Diagram part8Activity Diagram part8
Activity Diagram part8
 
Activity diagram model
Activity diagram modelActivity diagram model
Activity diagram model
 
Activity
ActivityActivity
Activity
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
Use Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling NotationUse Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling Notation
 
Activity Diagram
Activity DiagramActivity Diagram
Activity Diagram
 
SAD09 - Activity Diagrams
SAD09 - Activity DiagramsSAD09 - Activity Diagrams
SAD09 - Activity Diagrams
 
Uml examples
Uml examplesUml examples
Uml examples
 
UML.pptx
UML.pptxUML.pptx
UML.pptx
 
ACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptxACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptx
 
Activity Diagram Examples by Creately
Activity Diagram Examples by Creately Activity Diagram Examples by Creately
Activity Diagram Examples by Creately
 
Lecture 19...unit 3.....se
Lecture 19...unit 3.....seLecture 19...unit 3.....se
Lecture 19...unit 3.....se
 
A Suite of Metrics for UML Behavioral Diagrams based on Complexity Perspectives
A Suite of Metrics for UML Behavioral Diagrams based on Complexity PerspectivesA Suite of Metrics for UML Behavioral Diagrams based on Complexity Perspectives
A Suite of Metrics for UML Behavioral Diagrams based on Complexity Perspectives
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
 
SubirTarea.pdf
SubirTarea.pdfSubirTarea.pdf
SubirTarea.pdf
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMS
 
Case tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick RajaCase tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick Raja
 
Lecture 4.pdf
Lecture 4.pdfLecture 4.pdf
Lecture 4.pdf
 
Introduction tobpmn 15 02
Introduction tobpmn 15 02Introduction tobpmn 15 02
Introduction tobpmn 15 02
 

Más de Mr SMAK

Fyp list batch-2009 (project approval -rejected list)
Fyp list batch-2009 (project approval -rejected list)Fyp list batch-2009 (project approval -rejected list)
Fyp list batch-2009 (project approval -rejected list)Mr SMAK
 
Assigments2009
Assigments2009Assigments2009
Assigments2009Mr SMAK
 
Evaluation of cellular network
Evaluation of cellular networkEvaluation of cellular network
Evaluation of cellular networkMr SMAK
 
Common protocols
Common protocolsCommon protocols
Common protocolsMr SMAK
 
Cellular network
Cellular networkCellular network
Cellular networkMr SMAK
 
Lecture 6.1
Lecture  6.1Lecture  6.1
Lecture 6.1Mr SMAK
 
Lecture 6
Lecture  6Lecture  6
Lecture 6Mr SMAK
 
Parallel architecture
Parallel architectureParallel architecture
Parallel architectureMr SMAK
 
Lecture 3
Lecture 3Lecture 3
Lecture 3Mr SMAK
 
Lecture 2
Lecture 2Lecture 2
Lecture 2Mr SMAK
 
Lecture 1
Lecture 1Lecture 1
Lecture 1Mr SMAK
 
Lecture 6
Lecture  6Lecture  6
Lecture 6Mr SMAK
 
Lecture 6.1
Lecture  6.1Lecture  6.1
Lecture 6.1Mr SMAK
 
Chapter 2 ASE
Chapter 2 ASEChapter 2 ASE
Chapter 2 ASEMr SMAK
 
Structure of project plan and schedule
Structure of project plan and scheduleStructure of project plan and schedule
Structure of project plan and scheduleMr SMAK
 
Proposal format
Proposal formatProposal format
Proposal formatMr SMAK
 
Proposal announcement batch2009
Proposal announcement batch2009Proposal announcement batch2009
Proposal announcement batch2009Mr SMAK
 
List ofsuparco projectsforuniversities
List ofsuparco projectsforuniversitiesList ofsuparco projectsforuniversities
List ofsuparco projectsforuniversitiesMr SMAK
 
Fyp timeline & assessment policy batch 2009
Fyp timeline & assessment policy batch 2009Fyp timeline & assessment policy batch 2009
Fyp timeline & assessment policy batch 2009Mr SMAK
 

Más de Mr SMAK (20)

Fyp list batch-2009 (project approval -rejected list)
Fyp list batch-2009 (project approval -rejected list)Fyp list batch-2009 (project approval -rejected list)
Fyp list batch-2009 (project approval -rejected list)
 
Assigments2009
Assigments2009Assigments2009
Assigments2009
 
Week1
Week1Week1
Week1
 
Evaluation of cellular network
Evaluation of cellular networkEvaluation of cellular network
Evaluation of cellular network
 
Common protocols
Common protocolsCommon protocols
Common protocols
 
Cellular network
Cellular networkCellular network
Cellular network
 
Lecture 6.1
Lecture  6.1Lecture  6.1
Lecture 6.1
 
Lecture 6
Lecture  6Lecture  6
Lecture 6
 
Parallel architecture
Parallel architectureParallel architecture
Parallel architecture
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Lecture 6
Lecture  6Lecture  6
Lecture 6
 
Lecture 6.1
Lecture  6.1Lecture  6.1
Lecture 6.1
 
Chapter 2 ASE
Chapter 2 ASEChapter 2 ASE
Chapter 2 ASE
 
Structure of project plan and schedule
Structure of project plan and scheduleStructure of project plan and schedule
Structure of project plan and schedule
 
Proposal format
Proposal formatProposal format
Proposal format
 
Proposal announcement batch2009
Proposal announcement batch2009Proposal announcement batch2009
Proposal announcement batch2009
 
List ofsuparco projectsforuniversities
List ofsuparco projectsforuniversitiesList ofsuparco projectsforuniversities
List ofsuparco projectsforuniversities
 
Fyp timeline & assessment policy batch 2009
Fyp timeline & assessment policy batch 2009Fyp timeline & assessment policy batch 2009
Fyp timeline & assessment policy batch 2009
 

Último

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Último (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Lab # 05

  • 1. Advance Software Engineering UML Diagram LAB # 05 Objective: • To understand Activity Diagram. The Activity Diagram The purpose of the activity diagram is to model the procedural flow of actions that are part of a larger activity. In projects in which use cases are present, activity diagrams can model a specific use case at a more detailed level. However, activity diagrams can be used independently of use cases for modeling a business-level function, it models procedural flow, the activity diagram focuses on the action sequence of execution and the conditions that trigger or guard those actions. The activity diagram is also focused only on the activity's internal actions and not on the actions that call the activity in their process flow or that trigger the activity according to some event. Although UML sequence diagrams can protray the same information as activity diagrams, but activity diagrams show all potential sequence flows in an activity, whereas a sequence diagram typically shows only one flow of an activity. The basics Consider the action element in an activity diagram, whose official UML name is action state. An action is indicated on the activity diagram by a "capsule" shape. The text inside it indicates the action (e.g., Customer Calls Ticket Office or Registration Office Opens). Figure 1: A sample action that is part of an activity diagram. Because activity diagrams show a sequence of actions, they must indicate the starting point of the sequence. The initial state is drawn as a solid circle with a transition line (arrow) that connects it to the first action in the activity's sequence of actions. Figure 2 shows what an activity diagram's initial state looks like. It is important to note that there can be only one initial state on an activity diagram and only one 1
  • 2. Advance Software Engineering UML Diagram transition line connecting the initial state to an action. Although it may seem obvious that an activity can have only one initial state, there are certain circumstances -- namely, the commencement of asynchronous action sequences -- that may suggest that a new initial state should be indicated in the activity diagram. UML does not allow this. Figure 3 offers an example of an incorrect activity diagram, because the initial state has two transition lines that point to two activities. Figure 3: Incorrect rendering of an initial state within an activity diagram. The initial state can indicate only ONE action. The activity's flow terminates when the transition line of the last action in the sequence connects to a "final state" symbol, which is a bullseye (a circle surrounding a smaller solid circle). Beyond the basics Activities modeled for real software development projects include decision points that control what actions take place. And sometimes activities have parallel actions. Decision points Typically, decisions need to be made throughout an activity, depending on the outcome of a specific prior action. In creating the activity diagram for such cases, you might need to model two or more different sequences of actions. The UML specification provides two ways to model decisions like this. The first way is to show a single transition line coming out of an action and connecting to a decision point. The UML specification name for a decision point is decision, and it is drawn as a diamond on an activity diagram. Since a decision will have at least two different outcomes, the decision symbol will have multiple transition lines connecting to different actions. Figure 5 shows a fragment of a sample activity diagram with a decision. Figure 5: A decision point models a choice that must be made within the sequence of actions. 2
  • 3. Advance Software Engineering UML Diagram As shown in Figure 5, each transition line involved in a decision point must be labeled with text above it to indicate "guard conditions," commonly abbreviated as guards. Guard condition text is always placed in brackets -- for example, [guard condition text]. A guard condition explicitly tells when to follow a transition line to the next action. According to the decision point shown in Figure 5, a bartender (user) only needs to "make sure the customer is at least 21 years old" when the customer orders an alcoholic drink. If the customer orders any other type of drink (the "else" condition), then the bartender simply gets the drink for the customer. The [else] guard is commonly used in activity diagrams to mean "if none of the other guarded transition lines matches the actual condition," then follow the [else] transition line. Merge points Sometimes the procedural flow from one decision path may connect back to another decision path, as shown in Figure 6 at the "Customer's Age > = 21" condition. In these cases, we connect two or more action paths together using the same diamond icon with multiple paths pointing to it, but with only one transition line coming out of it. This does not indicate a decision point, but rather a merge. Figure 6 shows the same decision as in Figure 5, but Figure 6 expands the activity diagram. Performing a check of the customer's age leads the user to a second decision: If the customer is younger than 21, the bartender must tell the customer to order another non-alcoholic drink, which takes our sequence back to the action "Customer Orders Drink." However, if the customer is 21 years old or older, then our action sequence takes take us to the same action the bartender would follow if the person had ordered a non-alcoholic drink: "Get Drink For Customer." Figure 6: A partial activity diagram, showing two decision points ("Drink is alcoholic" and "Customer's age < 21") and one merge ("else" and "Customer's age >= 21") 3
  • 4. Advance Software Engineering UML Diagram Synch states for asynchronous actions When modeling activities, you sometimes need to show that certain action sequences can be done in parallel, or asynchronously. A special notation element allows you to show parallel action sequences, or synch states. To be clear, a synch state that forks actions into two or more threads represents a de-synchronizing of the flow (asynchronous actions), and a synch state that joins actions back together represents a return to synchronized flow. A synch state is drawn as a thick, solid line with transition lines coming into it from the left (usually) and out of it on the right (usually). To draw a synch state that forks the action sequence into multiple threads, first connect a transition line from the action preceding the parallel sequence to the synch state. Then draw two transition lines coming out of the synch state, each connecting to its own action. Figure 9 is an activity diagram fragment that shows the forking of execution modeled. Figure 9: A thick, solid line indicates a synch state, allowing two or more action sequences to proceed in parallel. 4
  • 5. Advance Software Engineering UML Diagram Swim lanes In activity diagrams, it is often useful to model the activity's procedural flow of control between the objects (persons, organizations, or other responsible entities) that actually execute the action. To do this, you can add swim lanes to the activity diagram (swim lanes are named for their resemblance to the straight-line boundaries between two or more competitors at a swim meet). To put swim lanes on an activity diagram, use vertical columns. For each object that executes one or more actions, assign a column its name, placed at the top of the column. Then place each action associated with an object in that object's swim lane. Figure 12 shows that two objects execute actions (e.g., Band Manager and Reporting Tool). The Band Manager object executes the "Selects the View Sales For My Band Report" action, and the Reporting Tool executes the "Retrieve Bands the Band Manager Manages" action. It is important to note that, although using swimlanes improves the clarity of an activity diagram (since all the activities are placed in the swimlanes of their respective executor objects), all the previously mentioned rules governing activity diagrams still hold true. In other words, you read the activity diagram just like you would if no swimlanes were used. 5
  • 6. Advance Software Engineering UML Diagram Task TO Be Performed…… Task # 01 : When I order Chinese food for delivery, I call the Chinese food delivery guy, give him my phone number, and his computer will automatically display my address if I've ordered food before. But if I'm a new customer calling for the first time, he must get my address before he takes my order. Task# 02 : Below an activity diagram is shown. Give an interpretation of the diagram. Task# 03 : Eastern State University (ESU) Background The ESU course registration problem will be used as an example throughout this book. The process of assigning professors to courses and the registration of students is a frustrating and time consuming experience. After the professors of ESU have decided which courses they are going to teach for the semester, the Registrar's office enters the information into the computer system. A batch report is printed for the professors indicating which courses they will teach. A course catalog is printed and distributed to the students. The students currently fill out (mulitpart, multicolor) registration forms that indicate their choice in courses, and return the completed forms to the Registrar's office. The typical student load is four courses. The staff of the Registrar's office then enters the students' forms into the mainframe computer system. Once the students' curriculum for the semester has been entered, a batch job is run overnight to assign students to courses. Most of the time the students get their first choice; however, in those cases where there is a conflict, the Registrar's office talks with each student to get additional choices. Once all the students have been successfully assigned to courses, a hard copy of the students' schedule is sent to the students for their 6
  • 7. Advance Software Engineering UML Diagram verification. Most student registrations are processed within a week, but some exceptional cases take up to two weeks to solve. Once the initial registration period is completed, professors receive a student roster for each course they are scheduled to teach. Draw an activity diagram for the senerio described above. Task # 04 Draw an activity diagram models the business process of enrolling in a university, takes this approach. A student gets enrolled in the university if the form filled is correct otherwise a help system is available. If student successfully get enrolled in the university he/she can attend classes can enrolled in the seminar committee and need to pay library fee as well. Task # 05 Create an activity diagram describing the process of a person (user) using the machine to buy a ticket from Hamburg to Lübeck. Actually, the machine only takes coins (no credit cards, debit cards). Task # 06 Create a sequence diagram for the following collaboration. Use the classes and methods on the next slide. A customer wants to draw money from his bank account. He enters his card into an ATM (automated teller machine). The ATM machine prompts „Enter PIN“. The customer enters his PIN. The ATM (internally) retrieves the bank account number from the card. The ATM encrypts the PIN and the account number and sends it over to the bank. The bank verifies the encrypted Account and PIN number. If the PIN number is correct, the ATM displays „Enter amount“, draws money from the bank account and pays out the amount.(Use Swimlanes) 7