Académique Documents
Professionnel Documents
Culture Documents
Example;
1. A car is a vehicle. An auto rickshaw is a vehicle. A truck is vehicle. In which vehicle is supper class
and the car, auto rickshaw and the truck are sub classes.
2. A dog is an animal. A cat is an animal. A cow is an animal. A lion is an animal. In which animal is
supper class and the dog, cat and lion are subclasses.
Describes one main flow of events (also called a basic course of action), and possibly other ones,
called exceptional flows of events (also called alternate courses of action)
Is multi-level, so that one use case can use the functionality of another one.
4. What is the difference between a scenario and a use
case? When do you use each construct?
A scenario is an actual sequence of interactions (i.e., an instance) describing one specific situation; a
use case is a general sequence of interactions (i.e., a class) describing all possible scenarios associated
with a situation. Scenarios are used as examples and for clarifying details with the client. Use cases
are used as complete descriptions to specify a user task or a set of related system features.
Join:
A Join may have two or more incoming transactions and one outgoing transaction.
1. Above the join, the activity associated with each of these paths continues in parallel.
2. Conceptually, the activities of each of outgoing transactions are concurrent.
1. Either truly concurrent.
2. Or sequential yet interleaved.
Result;
A Fork have one incoming transaction and two more outgoing transactions whereas a join may have
two or more incoming transactions and one outgoing transaction.
7. Define UML.
UML is a standard language for specifying, visualizing, constructing, and documenting the
artifacts of software systems.
UML was created by the Object Management Group (OMG) and UML 1.0 specification draft
was proposed to the OMG in January 1997.
UML is different from the other common programming languages such as C++, Java, COBOL, etc.
UML can be described as a general purpose visual modeling language to visualize, specify, construct,
and document software system.
Although UML is generally used to model software systems, it is not limited within this boundary. It
is also used to model non-software systems as well. For example, the process flow in a
manufacturing unit, etc.
UML is not a programming language but tools can be used to generate code in various
languages using UML diagrams. UML has a direct relation with object oriented analysis
and design. After some standardization, UML has become an OMG standard.
• Bank Customer
• ATM Maintainer
• Thief
The last actor is often referred to as a “misactor” in the literature, because it is an actor that interacts with
the system but shouldn’t.
Long questions:
1.What is UML? Discuss activity and
use case diagram with examples.
UML is a standard language for specifying, visualizing, constructing, and documenting the
artifacts of software systems.
UML was created by the Object Management Group (OMG) and UML 1.0 specification draft
was proposed to the OMG in January 1997.
UML is different from the other common programming languages such as C++, Java, COBOL, etc.
Although UML is generally used to model software systems, it is not limited within this boundary. It
is also used to model non-software systems as well. For example, the process flow in a
manufacturing unit, etc.
UML is not a programming language but tools can be used to generate code in various
languages using UML diagrams. UML has a direct relation with object oriented analysis
and design. After some standardization, UML has become an OMG standard.
Activity diagram:
An activity diagram visually presents a series of actions or flow of control in a system similar to
a flowchart or a data flow diagram. Activity diagrams are often used in business process modeling. They
can also describe the steps in a use case diagram. Activities modeled can be sequential and concurrent. In
both cases an activity diagram will have a beginning (an initial state) and an end (a final state).
Object Flow
Object flow refers to the creation and modification of objects by activities. An object flow arrow
from an action to an object means that the action creates or influences the object. An object flow
arrow from an object to an action indicates that the action state uses the object.
Guards
In UML, guards are a statement written next to a decision diamond that must be true before
moving next to the next activity. These are not essential, but are useful when a specific answer,
such as "Yes, three labels are printed," is needed before moving forward.
Synchronization
A fork node is used to split a single incoming flow into multiple concurrent flows. It is
represented as a straight, slightly thicker line in an activity diagram.
A join node joins multiple concurrent flows back into a single outgoing flow.
A fork and join mode used together are often referred to as synchronization.
Time Event
This refers to an event that stops the flow for a time; an hourglass depicts it.
Merge Event
A merge event brings together multiple flows that are not concurrent.
Interrupting Edge
An event, such as a cancellation, that interrupts the flow denoted with a lightning bolt.
Swim lanes
Swim lanes group related activities into one column.
Final State or End Point
An arrow pointing to a filled circle nested inside another circle represents the final action state.
Activity Diagram Examples
The best way to understand activity diagrams is to look at some examples of activity diagrams.
Use-case diagram:
A use case is a list of actions or event steps typically defining the interactions between a
role of an actor and a system to achieve a goal. A use case is a useful technique for
identifying, clarifying, and organizing system requirements. A use case is made up of a
set of possible sequences of interactions between systems and users that defines the
features to be implemented and the resolution of any errors that may be encountered.
While a use case itself might drill into a lot of detail (such as, flow of events and
scenarios) about every possibility, a use-case diagram can help provide a higher-level
view of the system, providing the simplified and graphical representation of what the
system must actually do.
n components
Actor;
Actors are usually individuals involved with the system defined according to their roles. The actor can be
a human or other external system.
Use Case;
A use case describes how actors uses a system to accomplish a particular goal. Use cases are typically
initiated by a user to fulfill goals describing the activities and variants involved in attaining the goal.
Relationship;
The relationships between and among the actors and the use cases
System Boundary;
The system boundary defines the system of interest in relation to the world around it.
Example:
UML was created by the Object Management Group (OMG) and UML 1.0 specification draft was
proposed to the OMG in January 1997.
UML can be described as a general purpose visual modeling language to visualize, specify,
construct, and document software system.
Although UML is generally used to model software systems, it is not limited within this
boundary. It is also used to model non-software systems as well. For example, the process flow
in a manufacturing unit, etc.
UML is not a programming language but tools can be used to generate code in various languages
using UML diagrams. UML has a direct relation with object oriented analysis and design. After
some standardization, UML has become an OMG standard.
Standard;
UML is the current standard for programming in object-oriented programming languages. When creating
classes and other objects with relationships between each other, UML is what is used to visually describe
these relationships. Because it is used as a standard, it is widely understood and well known. This makes
it easy for a new programmer to step into a project and be productive from day one.
Planning Tool;
UML helps to plan a program before the programming takes place. In some tools used to model UML, the
tool will generate code based on the classes set up in the model. This can help reduce overhead during the
implementation stage of any program. Additionally, a UML model diagram is easy to change, whereas
reprogramming a section of code can be tedious and time-consuming.
Visual Representation;
A UML diagram is a visual representation of the relationships between classes and entities in a computer
program. A class is an object in programming that organizes similar variables and functions in one
location. To understand a program, it is essential to understand what each class object does, the
information it stores and how it relates to other classes in the program. By showing this information in a
diagram, it is easy to understand and visualize a program's relationships.