1. OBJECT OREINTED ANALYSIS & DESIGN
(OOAD)
ï COURSE OBJECTIVES:
ï¶ The focus of this course is on design rather than implementation.
ï¶ Introducing the Unified Process and showing how UML can be used within the process.
ï¶ Case study experience with architecture, analysis, and design.
ï¶ Programmatic interactions using UML diagrams and OOP.
ï COURSE OUTCOMES:
ï¶ Understand the concepts of object-oriented modeling.
ï¶ Apply qualitative knowledge and techniques to develop use case diagrams.
ï¶ Create class diagrams that model both the domain model and design model of a software
system.
ï¶ Create interaction diagrams that model the dynamic aspects of a software system.
ï¶ Design a logical architecture in terms of layers and partitions with the Layers pattern
with case study.
2. UNIT â 1
INTRODUCTION TO OOAD
ï CONTENTS:
ï¶ Introduction to OOAD
ïŒ Importance of Modeling,
ïŒ Principles of Modeling,
ïŒ Object Oriented Modeling,
ïŒ Conceptual Model of the Unified Modeling Language (UML),
ïŒ Architecture of OOAD / UML, &
ïŒ Software Development Life Cycle (SDLC).
ï¶ Introduction to Iterative Development and the Unified Process
ï¶ Case Study --- The Next Gen POS System
ï¶ Architectural Layers and Case Study Emphasis.
3. INTRODUCTION TO OOAD
ï HISTORY OF OOAD:
âą Object-Oriented Analysis and Design (OOAD) is a technical approach for analyzing and designing an
application, system, or business by applying object-oriented programming, as well as using visual modeling
throughout the software development process to guide stakeholder communication and product quality.
âą OOAD in modern software engineering is typically conducted in an iterative and incremental way. The
outputs of OOAD activities are analysis models (for OOA) and design models (for OOD) respectively. The
intention is for these to be continuously refined and evolved, driven by key factors like risks and business
value.-
âą In the early days of object-oriented technology before the mid-1990âs, there were many different competing
methodologies for software development and object-oriented modeling, often tied to specific Computer
Aided Software Engineering (CASE) tool vendors, and there were No Standard Notations, Consistent Terms,
& Process Guides that degraded the communication efficiency & lengthened the learning curves.
âą Some of the well-known early object-oriented methodologies were from and inspired by gurus such as
Grady Booch, James Rumbaugh, Ivar Jacobson (the Three Amigos), Robert Martin, Peter Coad, Sally
Shlaer, Stephen Mellor, and Rebecca Wirfs-Brock.
âą In 1994, the Three Amigos of Rational Software started working together to develop the Unified Modeling
Language (UML). Later, together with Philippe Kruchten and Walker Royce (eldest son of Winston Royce),
they have led a successful mission to merge their own methodologies, OMT, OOSE and Booch method, with
various insights and experiences from other industry leaders into the Rational Unified Process (RUP), a
comprehensive iterative and incremental process guide and framework for learning industry best practices
of software development and project management. Since then, the Unified Process family has become
probably the most popular methodology and reference model for object-oriented analysis and design.
4. INTRODUCTION TO OOAD
ï OOAD Basics:
âą A Software Development Methodology is a series of processes that leads to the development of an application like:
1. Planning / Requirements Gathering,
2. System Analysis,
3. Modeling,
4. Design,
5. Implementation,
6. Testing, and
7. Maintenance & Deployment.
âą Mainly, there are two orthogonal views of software development like:
1. Traditional Technique â focuses on data and functions.
2. Object Oriented Methodologies â focuses on objects that combines data and functionality.
âą Object Oriented Systems Development develop software by building objects that can be easily replaced, modified, and
reused. Objects has attribute (data) and methods (functions). The Object Oriented Systems in the software development are:
1. Easier to adapt to changes,
2. Easier to maintain,
3. Promote greater design and code reuse, and
4. Creates modules of functionality.
5. INTRODUCTION TO OOAD
ï What is OOAD??? ï ï ï OOAD can be defined as OOA, OOD, & OOM.
1. Object Oriented Analysis (OOA):
ï¶ Analysis is the process of investigation of the problem and the requirements than finding its solution.
ï¶ Analysis is classified as:
1. Requirement Analysis, and
2. Object Oriented Analysis.
ï¶ In Object Oriented Analysis finding and describing the objects or concepts in the problem domain is done.
ï¶ Let us consider an Example like:
âą In flight information system, during analysis the concepts identified are:
ïŒ Plane,
ïŒ Flight, &
ïŒ Pilot.
2. Object Oriented Design (OOD):
ï¶ Design is the process of finding a conceptual solution that fulfills the requirements than implementing it.
ï¶ Design is classified into:
1. Database Design, and
2. Object Oriented Design.
6. INTRODUCTION TO OOAD
ï¶ In Object Oriented Design, software objects are defined and collaborated to fulfill the requirements.
ï¶ Let us consider an Example like:
âą In flight information system, the plane is a software object having:
ïŒ Attribute - TailNumber, &
ïŒ Method - getFlightHistory.
ï¶ Finally, to summarize the words Analysis & Design in OOAD as âDO THE RIGHT THINGâ & âDO THE
THING RIGHTâ.
ï¶ The representation of Objects in OOAD from above example can be defined as:
7. INTRODUCTION TO OOAD
ï EXAMPLE:
âą In general, the Key Steps in the Analysis & Design include:
âą Define Use Cases,
âą Define Domain Model,
âą Define Interaction Diagrams, and
âą Define Design Class Diagrams.
1. Define Use Cases:
âą Requirement Analysis consists of use cases scenarios of how people use the application.
âą In the dice game, the use cases include:
Play a Dice game
Player rolls dice
System gives results
Player wins if dice value totals seven
Otherwise loses
8. INTRODUCTION TO OOAD
2. Define a Domain Model:
âą Object Oriented Analysis describes the problem domain by identifying:
a. Concept,
b. Attributes, and
c. Associations.
âą All these are represented in a domain model.
âą The concepts, attributes, and associations of the dice game are represented as:
9. INTRODUCTION TO OOAD
3. Define Interaction Diagrams:
âą In Object Oriented Design, software objects are defined with their responsibilities and collaborations.
âą Sequence diagram is used to represent the collaborations.
âą It is the flow of messages between software objects.
âą For Example: In a dice game, the player rolls the dice in real world.
âą But in Software Design, it is illustrated as die object shown in the following sequence diagram:
10. INTRODUCTION TO OOAD
4. Define Design Class Diagram:
âą In the Interaction Diagram (Sequence Diagram) the dynamic view of collaborating objects is shown.
âą The static view of the classes can be shown with Class Diagram.
âą For Example: The class diagram for the above sequence diagram of the dice game can be shown as:
ïŒ Here Dice game has play method. Dice has roll and getFaceValue methods.
ï Now, letâs go through the Modeling in detail with the following:
ï¶ Importance of Modeling,
ï¶ Principles of Modeling,
ï¶ Object â Oriented Modeling, and
ï¶ Conceptual Model of UML.
11. INTRODUCTION TO OOAD
1. IMPORTANCE OF MODELING:
âą Why do we model?
ïŒ A model is a simplification at some level of abstraction.
âą We build models to better understand the systems we are developing:
ïŒ To help us âTo Visualizeâ the system,
ïŒ To specify the âStructure or Behaviorâ of the system,
ïŒ To provide the âTemplateâ for building a system, and
ïŒ To âDocumentâ the decisions that we have made.
2. PRINCIPLES OF MODELING:
ï¶ The models we choose have a profound influence on the solution we provide.
ï¶ Every model may be expressed at different levels of abstraction.
ï¶ The best models are connected to reality.
ï¶ No single model is sufficient, a set of models is needed to solve any non-trivial system.
ï¶ UML is a Unified / Visual Modeling Language,
ïŒ âA picture is worth of a thousand words.â - old saying, i.e., the âUMLâ is a âA Language provides a
Vocabulary and the Rules for combining words for the purpose of Communicationâ.
12. INTRODUCING THE UML
ï¶ A Modeling Language is a Language whose vocabulary and Rules focus on the conceptual and physical
representation of a system. A Modeling Language such as the UML is thus a standard language for
software blueprintsâ.
ï USAGES of UML:
âą UML is used in the course to:
a. Document Designs: used to design patterns / frameworks,
b. Represent Different Views / Aspects of Design: used to visualize and construct designs as static /
dynamic / deployment / modular aspects, and
c. Provide a Next-to-precise, Common, & Language-Specify Visually: used for the benefit of analysis,
discussion, & comprehension.
d. Abstraction takes Precedence over Precision:
ïŒ Uses 20/80 rule, &
ïŒ Aims to overview & comprehension, not execution.
3. OBJECT ORIENTED MODELING:
âą Traditionally, there are âtwoâ approaches to modeling a software system as:
a. Algorithmically: becomes hard to focus on as the requirements change, and
b. Object-Oriented âModels: more closely in use of real world entities.
13. ï CONCEPTUAL MODEL OF UML:
âą The Conceptual Model of UML in itâs simplest way can be depicted as:
14. INTRODUCING THE UML
ï To understand the UML, we need to form a Conceptual Model of the Language, and this requires
learning âthreeâ major elements like:
1. The UML's basic Building Blocks,
2. The Rules that dictate how those Building Blocks may be put together, and
3. Some Common Mechanisms that apply throughout the UML.
ï Once you have grasped these ideas, you will be able to read UML Models and create some basic
ones. As you gain more experience in applying the UML, you can build on this Conceptual Model,
using more advanced features of the language.
1. BUILDING BLOCKS OF THE UML:
âą The vocabulary of the UML encompasses âthreeâ kinds of Building Blocks:
A. Things,
B. Relationships, and
C. Diagrams.
âą Things are the abstractions that are first-class citizens in a model;
âą Relationships tie these things together; and
âą Diagrams groups the interesting collections of things.
15. INTRODUCING THE UML
A. THINGS IN THE UML:
âą There are âfourâ kinds of Things in the UML like:
i. Structural Things,
ii. Behavioral Things,
iii. Grouping Things, and
iv. Annotational Things.
âą These Things are the basic Object-Oriented Building Blocks of the UML. We use them to
write well-formed models.
i. STRUCTURAL THINGS:
ï¶ Structural Things are the Nouns of UML models. These are the mostly static parts of a model,
representing elements that are either conceptual or physical. Collectively, the Structural Things are
called as âClassifiersâ.
ï¶ These Classifiers / Structural Things are classified into â8â types like:
1. A âClassâ is a description of a set of objects that share the same attributes, operations,
relationships, and semantics.
ïŒ A class implements one or more interfaces. Graphically, a âclassâ is rendered as a rectangle,
usually including its name, attributes, and operations, as shown in below figure as âClassesâ:
16. INTRODUCING THE UML
2. An âinterfaceâ is a collection of operations that specify a service of a class or component. It
therefore, describes the externally visible behavior of that element.
ïŒ An interface might represent the complete behavior of a class or component or only a part of that
behavior.
ïŒ An interface defines a set of operation specifications (that is, their signatures) but never a set of
operation implementations.
ïŒ Graphically, an âinterfaceâ provided by a class to the outside world is shown as a small circle
attached to the class box by a line, and
ïŒ Also, an âinterfaceâ required by a class from some other class is shown as a small semicircle attached
to the class box by a line, as shown in above figure.
17. INTRODUCING THE UML
3. A âcollaborationâ defines an interaction and is a society of roles and other elements that work
together to provide some cooperative behavior that's bigger than the sum of all the elements.
ïŒ Collaborations have structural, as well as behavioral, dimensions.
ïŒ A given class or object might participate in several collaborations. These collaborations therefore
represent the implementation of patterns that make up a system.
ïŒ Graphically, a âcollaborationâ is rendered as an ellipse with dashed lines, sometimes including only its
name, as shown in below figure as âCollaborationsâ:
4. A âuse caseâ is a description of sequences of actions that a system performs that yield
observable results of value to a particular actor.
ïŒ A use case is used to structure the behavioral things in a model.
ïŒ A use case is realized by a collaboration.
ïŒ Graphically, a âuse caseâ is rendered as an ellipse with solid lines, usually including only its name,
as shown in above figure as âUse casesâ:
18. INTRODUCING THE UML
ï¶ The remaining three structural things like: Active Classes, Components, and Nodes are all class-
like, meaning they also describe sets of entities that share the same attributes, operations,
relationships, & semantics, and these three are different enough.
5. An âactive classâ is a class whose objects own one or more processes or threads and therefore can
initiate control activity.
ïŒ An active class is just like a class except that its objects represent elements whose behavior is concurrent
with other elements.
ïŒ Graphically, an âactive classâ is rendered as a class with double lines on the left and right; it usually
includes its name, attributes, and operations, as shown in below figure as âActive Classesâ:
19. INTRODUCING THE UML
6. A âcomponentâ is a modular part of the system design that hides its implementation behind a set of
external interfaces.
ïŒ Within a system, components sharing the same interfaces can be substituted while preserving the same
logical behavior.
ïŒ The implementation of a component can be expressed by wiring together parts and connectors; the parts can
include smaller components.
ïŒ Graphically, a âcomponentâ is rendered like a class with a special icon in the upper right corner, as shown in
above figure as âComponentsâ:
ï¶ The remaining two elements artifacts and nodes are also different. They represent physical things,
whereas the previous five / six things represent conceptual or logical things.
7. An âartifactâ is a physical and replaceable part of a system that contains physical information called
as "bits".
ïŒ In a system, you'll encounter different kinds of deployment artifacts, such as source code files, executables,
and scripts.
ïŒ An artifact typically represents the physical packaging of source or run-time information.
ïŒ Graphically, an âartifactâ is rendered as a rectangle with the keyword «artifact» above the name, as shown in
below figure as âArtifactsâ:
20. INTRODUCING THE UML
8. A ânodeâ is a physical element that exists at run time and represents a computational resource,
generally having at least some memory and, often, processing capability.
ïŒ A set of components may reside on a node and may also migrate from node to node.
ïŒ Graphically, a ânodeâ is rendered as a cube, usually including only its name, as shown in above figure as
âNodesâ:
ï¶ These âeightâ elements like classes, interfaces, collaborations, use cases, active classes, components,
artifacts, and nodes are the basic structural things that you may include in a UML model.
ï¶ There are also variations on these, such as actors, signals, and utilities (kinds of classes); processes
and threads (kinds of active classes); and applications, documents, files, libraries, pages, and tables
(kinds of artifacts).
21. INTRODUCING THE UML
ii. BEHAVIORAL THINGS:
ï¶ Behavioral Things are the Verbs of UML models. These are the mostly dynamic parts of a
model, representing behavior over time & space.
ï¶ The Behavioral Things are classified into â3â types like:
1. First an âInteractionâ is a behavior that comprises a set of messages exchanged among a set
of objects or roles within a particular context to accomplish a specific purpose.
ïŒ The behavior of a society of objects or of an individual operation may be specified with an
interaction.
ïŒ An interaction involves a number of other elements, including messages, actions, and connectors
(the connection between objects).
ïŒ Graphically, a âmessageâ is rendered as a directed line, shown in below figure as âMessagesâ:
2. Second, a âState Machineâ is a behavior that specifies the sequences of states an object or
an interaction goes through during its lifetime in response to events, together with its
responses to those events.
ïŒ The behavior of an individual class or a collaboration of classes may be specified with a state
machine.
ïŒ A state machine involves a number of other elements, including states, transitions (the flow from
state to state), events (things that trigger a transition), and activities (the response to a transition).
ïŒ Graphically, a âstateâ is rendered as a rounded rectangle, usually including its name and its
substates, if any, as shown in below figure as âStatesâ:
22. INTRODUCING THE UML
3. Third an âActivityâ is a behavior that specifies the sequence of steps a computational
process performs.
ïŒ In an interaction, the focus is on the set of objects that interact, whereas in a state machine, the
focus is on the life cycle of one object at a time, and in an activity, the focus is on the flows among
steps without regard to which object performs each step. A step of an activity is called an âactionâ.
ïŒ Graphically, an âactionâ is rendered as a rounded rectangle with a name indicating its purpose, as
shown in above figure as âActionsâ. The States and actions are distinguished by their different
contexts.
ï¶ These âthreeâ elements like interactions, state machines, and activities are the basic behavioral
things that you may include in a UML model. Semantically, these elements are usually connected
to various structural elements like, primarily classes, collaborations, and objects.
23. INTRODUCING THE UML
iii. GROUPING THINGS:
ï¶ Grouping Things are the organizational parts of UML models. These are the boxes into which
a model can be decomposed. The Grouping Thing is primarily of â1â kind namely âPackagesâ.
1. A âPackageâ is a general-purpose mechanism for organizing the design itself, as opposed to
classes, which organize implementation constructs.
ïŒ Structural things, behavioral things, and even other grouping things may be placed in a package.
ïŒ Unlike components (which exist at run time), a package is purely conceptual (meaning that it exists
only at development time).
ïŒ Graphically, a âpackageâ is rendered as a tabbed folder, usually including only its name and,
sometimes, its contents, as shown in below figure as âPackagesâ:
24. INTRODUCING THE UML
ï¶ Packages are the basic grouping things with which you may organize a UML model. There are
also variations, such as frameworks, models, and subsystems (kinds of packages).
iv. ANNOTATIONAL THINGS:
ï¶Annotational Things are the explanatory parts of UML models. These are the comments
you may apply to describe, illuminate, and remark about any element in a model. The
Annotational Thing is also primarily of â1â kind called as âNoteâ.
1. A âNoteâ is a simply a symbol for rendering constraints and comments attached to an
element or a collection of elements.
ïŒ Graphically, a ânoteâ is rendered as a rectangle with a dog-eared corner, together with a
textual or graphical comment, as shown in above figure as âNotesâ.
ï¶ This element is the one basic Annotational Thing you may include in a UML model. You'll
typically use ânotesâ to adorn your diagrams with constraints or comments that are best
expressed in informal or formal text. There are also variations on this element, such as
requirements (which specify some desired behavior from the perspective of outside the model).
B. RELATIONSHIPS IN THE UML:
âą There are âfourâ kinds of Relationships in the UML like:
i. Dependency,
ii. Association,
iii. Generalization, and
iv. Realization.
25. INTRODUCING THE UML
ï¶ These Relationships are the basic relational Building Blocks of the UML. We use them to write
well-formed models.
1. First, a âDependencyâ is a semantic relationship between two model elements in which a
change to one element (the independent one) may affect the semantics of the other element
(the dependent one).
ïŒ Graphically, a âdependencyâ is rendered as a dashed line, possibly directed, and occasionally
including a label, as shown in below figure as âDependenciesâ.
2. Second, an âAssociationâ is a structural relationship among classes that describes a set of
links, a link being a connection among objects that are instances of the classes.
ïŒ Aggregation is a special kind of association, representing a structural relationship between a whole
and its parts.
ïŒ Graphically, an association is rendered as a solid line, possibly directed, occasionally including a
label, and often containing other adornments, such as multiplicity and end names, as shown in
below figure as âAssociationsâ.
3. Third, a âGeneralizationâ is a specialization/generalization relationship in which the
specialized element (the child) builds on the specification of the generalized element (the
parent).
ïŒ The child shares the structure and the behavior of the parent.
ïŒ Graphically, a generalization relationship is rendered as a solid line with a hollow arrowhead
pointing to the parent, as shown in below figure as âGeneralizationsâ.
26. INTRODUCING THE UML
4. Fourth, a ârealizationâ is a semantic relationship between classifiers, wherein one classifier
specifies a contract that another classifier guarantees to carry out.
ïŒ We'll encounter realization relationships in two places: between interfaces and the classes or
components that realize them, and between use cases and the collaborations that realize them.
ïŒ Graphically, a ârealizationâ relationship is rendered as a cross between a generalization and a
dependency relationship, as shown in above figure as âRealizationsâ.
ï¶ These âfourâ elements are the basic relational things you may include in a UML model. There are
also variations on these âfourâ, such as refinement, trace, include, and extend.
27. INTRODUCING THE UML
C. DIAGRAMS IN THE UML:
ï¶ A âDiagramâ is the graphical presentation of a set of elements, most often rendered as a
connected graph of vertices (things) and paths (relationships).
ï¶ We draw diagrams to visualize a system from different perspectives, so a diagram is a projection
into a system. For all but the most trivial systems, a diagram represents an elided view of the
elements that make up a system.
ï¶ The same element may appear in all diagrams, only a few diagrams (the most common case), or in
no diagrams at all (a very rare case).
ï¶ In theory, a diagram may contain any combination of things and relationships. In practice,
however, a small number of common combinations arise, which are consistent with the five most
useful views that comprise the architecture of a software-intensive system.
ï¶ For this reason, the UML includes âthirteenâ kinds of Diagrams like:
i. Class Diagram,
ii. Object Diagram,
iii. Component Diagram,
iv. Composite Structure Diagram,
28. INTRODUCING THE UML
v. Use case Diagram,
vi. Sequence Diagram,
vii. Communication Diagram,
viii.State Diagram.
ix. Activity Diagram,
x. Deployment Diagram,
xi. Package Diagram,
xii. Timing, and
xiii.Interaction Overview Diagram.
1) A âclass diagramâ shows a set of classes, interfaces, and collaborations and their relationships.
ïŒ These diagrams are the most common diagram found in modeling object-oriented systems.
ïŒ Class diagrams address the static design view of a system.
ïŒ Class diagrams that include active classes address the static process view of a system.
ïŒ Component diagrams are variants of class diagrams.
29. INTRODUCING THE UML
2) An âobject diagramâ shows a set of objects and their relationships.
ïŒ Object diagrams represent static snapshots of instances of the things found in class diagrams.
ïŒ These diagrams address the static design view or static process view of a system as do class
diagrams, but from the perspective of real or prototypical cases.
3) A âcomponent diagramâ is shows an encapsulated class and its interfaces, ports, and internal
structure consisting of nested components and connectors.
ïŒ Component diagrams address the static design implementation view of a system.
ïŒ They are important for building large systems from smaller parts.
ïŒ The UML distinguishes a composite structure diagram, applicable to any class, from a
component diagram, but we combine the discussion because the distinction between a component
and a structured class is unnecessarily subtle.
4) A âuse case diagramâ shows a set of use cases and actors (a special kind of class) and their
relationships.
ïŒ Use case diagrams address the static use case view of a system.
ïŒ These diagrams are especially important in organizing and modeling the behaviors of a system.
30. INTRODUCING THE UML
5) Both âsequence diagramsâ and âcommunication diagramsâ are kinds of âinteraction diagramsâ. An
âinteraction diagramâ shows an interaction, consisting of a set of objects or roles, including the
messages that may be dispatched among them.
ïŒ Interaction diagrams address the dynamic view of a system.
ïŒ A âsequence diagramâ is an interaction diagram that emphasizes the time-ordering of messages;
whereas a âcommunication diagramâ is an interaction diagram that emphasizes the structural
organization of the objects or roles that send and receive messages.
ïŒ Sequence diagrams and communication diagrams represent similar basic concepts, but each
diagram emphasizes a different view of the concepts.
ïŒ Sequence diagrams emphasize temporal ordering, and communication diagrams emphasize the
data structure through which messages flow.
ïŒ A timing diagram (not covered in this book) shows the actual times at which messages are
exchanged.
6) A âstate diagramâ shows a state machine, consisting of states, transitions, events, and activities.
ïŒ A state diagrams shows the dynamic view of an object.
ïŒ They are especially important in modeling the behavior of an interface, class, or collaboration
and emphasize the event-ordered behavior of an object, which is especially useful in modeling
reactive systems.
31. INTRODUCING THE UML
7) An âactivity diagramâ shows the structure of a process or other computation as the flow of control
and data from step to step within the computation.
ïŒ Activity diagrams address the dynamic view of a system.
ïŒ They are especially important in modeling the function of a system and emphasize the flow of
control among objects.
8) A âdeployment diagramâ shows the configuration of run-time processing nodes and the components
that live on them.
ïŒ Deployment diagrams address the static deployment view of an architecture.
ïŒ A node typically hosts one or more artifacts.
9) An âartifact diagramâ shows the physical constituents of a system on the computer.
ïŒ Artifacts include files, databases, and similar physical collections of bits.
ïŒ Artifacts are often used in conjunction with deployment diagrams.
ïŒ Artifacts also show the classes and components that they implement.
ïŒ UML treats artifact diagrams as a variety of deployment diagram, but we discuss them
separately.
32. INTRODUCING THE UML
10) A âpackage diagramâ shows the decomposition of the model itself into organization units and their
dependencies.
11) A âtiming diagramâ is an interaction diagram that shows actual times across different objects or
roles, as opposed to just relative sequences of messages.
12) An âinteraction overview diagramâ is a hybrid of an activity diagram and a sequence diagram.
ïŒ These diagrams have specialized uses and so are not discussed in this book. See the UML
Reference Manual for more details.
ï¶ This is not a closed list of diagrams. Tools may use the UML to provide other kinds of diagrams,
although these are the most common ones that you will encounter in practice.
2. RULES OF THE UML:
ï¶ The UML's Building Blocks can't simply be thrown together in a random fashion.
ï¶ Like any language, the UML has a number of rules that specify what a well-formed model should
look like.
ï¶ A well-formed model is one that is semantically self-consistent and in harmony (a well defined
process supporting the user guide provides a step-by-step process to system engineer in Model-Driven
Development (MDD)) with all its related models.
ï¶ The UML has syntactic and semantic rules for the following terms:
33. INTRODUCING THE UML
a. Names: What you can call things, relationships, and diagrams,
b. Scope: The context that gives specific meaning to a name,
c. Visibility: How those names can be seen and used by others,
d. Integrity: How things properly and consistently relate to one another, and
e. Execution: What it means to run or simulate a dynamic model.
ï¶ Models built during the development of a software-intensive system tend to evolve and may be
viewed by many stakeholders in different ways and at different times. For this reason, it is common
for the development team to not only build models that are well-formed, but also to build models that
are:
a. Elided: Certain elements are hidden to simplify the view,
b. Incomplete: Certain elements may be missing, and
c. Inconsistent: The integrity of the model is not guaranteed.
ï¶ These less-than-well-formed models are unavoidable as the details of a system unfold and churn
during the software development life cycle. The rules of the UML encourage you but do not force you
to address the most important analysis, design, and implementation questions that push such models
to become well-formed over time.
34. INTRODUCING THE UML
3. COMMON MECHANISMS IN THE UML:
ï¶ A building is made simpler and more harmonious by the conformance to a pattern of common
features. A house may be built in the Victorian or French country style largely by using certain
architectural patterns that define those styles. The same is true of the UML. It is made simpler by
the presence of âfourâ common mechanisms that apply consistently throughout the language like:
1) Specifications,
2) Adornments,
3) Common divisions, and
4) Extensibility mechanisms.
1) Specifications:
ïŒ In UML, behind each graphical notation, there is a textual statement denoting the syntax and semantics.
These are the specifications.
ïŒ The specifications provide a semantic backplane that contains all the parts of all the models of a system and
the relationships among the different paths, that each part related to one another in consistent fashion.
2) Adornments:
ïŒ Each element in UML has a unique graphical notation. Besides, there are notations to represent the
important aspects of an element like name, scope, and visibility, etc.
35. INTRODUCING THE UML
3) Common Divisions:
ïŒ Object-Oriented Systems can be divided in many ways. The âtwoâ common ways of division are:
a. Division of Classes and Objects: A Class is an abstraction of a group of similar objects. An Object is the
concrete instance that has actual existence in the system.
b. Division of Interface and Implementation: An Interface defines the rules for interaction, whereas the
Implementation is the concrete realization of the rules defined in the interface.
4) Extensibility Mechanisms:
ïŒ UML is an open-ended language. It is possible to extend the capabilities of UML in a controlled
manner to suit the requirements of a system. The extensibility mechanisms are of â3â kinds:
a. Stereotypes:
ï§ It extends the vocabulary of the UML, through which new building blocks can be created out of
existing ones, but that are specific to your problem.
b. Tagged Values:
ï§ It extends the properties of UML Building Blocks, allowing you to create new information in that
elementâs specification.
c. Constraints:
ï§ It extends the semantics of UML Building Blocks, allowing you to add new rules or modify existing
ones.