SE UNIT-III - Part - 2
SE UNIT-III - Part - 2
2. Model:
It is a representation of a subject.
It captures a set of ideas (known as abstractions) about its subject.
3. Unified:
It is to bring together the information systems and technology industry’s best
engineering practices.
These practices involve applying techniques that allow us to successfully
develop systems.
To learn a new language, for example, let’s consider English, we learn the
character set (a-z) first and then the words and then several rules to form sentences
using those words.
Similarly to learn using UML, we should learn the vocabulary and then rules for
creating UML diagrams. The conceptual model of UML contains the UML’s
vocabulary and rules. So, to understand using UML and to create using UML
diagrams first we need to learn the conceptual model of UML.
These are the fundamental elements in UML. Every diagram can be represented
using these building blocks. The building blocks of UML contains three types of
elements. They are:
1) Things (object oriented parts of uml)
2) Relationships (relational parts of uml)
3) Diagrams
Things
Structural things
Represents the static aspects of a software system. There are seven structural
things in UML. They are:
Class: A class is a collection of similar objects having similar attributes,
behavior, relationships and semantics. Graphically class is represented as a
rectangle with three compartments.
Graphical representation:
Example:
Interface: An interface is a collection of operation signatures and/or attribute
definitions that ideally define a cohesive set of behavior. Graphically interface is
represented as a circle or a class symbol stereotyped with interface.
Graphical representation:
Or
Use Case: A use case is a collection of actions, defining the interactions between
a role (actor) and the system. Graphically use case is represented as a solid ellipse
with its name written inside or below the ellipse.
Graphical representation:
Example:
Collaboration: A collaboration is the collection of interactions among objects
to achieve a goal. Graphically collaboration is represented as a dashed ellipse.
A collaboration can be a collection of classes or other elements.
Graphical representation:
Example:
Node: A node is a physical element that exists at run time and represents a
computational resource. Graphically node is represented as a cube. Examples of
nodes are PCs, laptops, smartphones or any embedded system.
Graphical representation: Example:
Active Class: A class whose objects can initiate its own flow of control (threads)
and work in parallel with other objects. Graphically active class is represented as
a rectangle with thick borders.
Graphical representation: Example:
Behavioral Things
Grouping Things
Elements which are used for organizing related things and relationships in
models.
Annotational Things
Example:
Example:
Realization: Defines a semantic relationship in which one class specifies
something that another class will perform. Example: The relationship between an
interface and the class that realizes or executes that interface.
Diagrams
1) Class diagram
2) Object diagram
3) Use case diagram
4) Component diagram
5) Deployment diagram
6) Sequence diagram
7) Collaboration diagram
8) Statechart diagram
9) Activity diagram.
The rules of UML specify how the UMLs building blocks come together to
develop diagrams. The rules enable the users to create well-formed models. A
well-formed model is self-consistent and also consistent with the other models.
UML has rules for:
Names – What elements can be called as things, relationships and diagrams
Scope – The context that gives a specific meaning to a name
Visibility – How these names are seen and can be used by the other names
Integrity – How things properly relate to one another
Execution – What it means to run or simulate a model
Why UML is easy to learn and use? It’s because of the four common mechanisms
that apply throughout the UML. They are:
1. Specifications
2. Adornments
3. Common divisions
4. Extensibility mechanisms
Adornments: The mechanism in UML which allows the users to specify extra
information with the basic notation of an element is the adornments.
Extensibility Mechanisms:
UMLs extensibility mechanisms allow the user to extend (new additions) the
language in a controlled way. The extensibility mechanisms in UML are:
Tagged values are used to add to the information of the element (not of
its instances)
Stereotypes help to create new building blocks, whereas tagged values
help to create new attributes
These are commonly used to specify information relevant to code
generation, configuration management and so on
Example:
In the above example, we are specifying the exception “Overflow” using the class
symbol and stereo typing it with “exception”. Also under the class name,
“EventQueue” we are specifying additional properties like “version” and
“author” using tagged values.
Finally, we are constraining the operation named “add” that before adding a new
event to the EventQueue object, all the events must be “ordered” in some manner.
This is specified using constraints in UML.
Architecture