0% found this document useful (0 votes)
13 views14 pages

unit 1 uml oops

The document discusses the significance of UML (Unified Modeling Language) modeling in software development, emphasizing its role in visualizing, specifying, and documenting systems. It outlines the principles of UML modeling, including the importance of model selection, precision levels, and the necessity of multiple models to capture different aspects of a system. Additionally, it provides an overview of various UML diagrams used to represent both structural and behavioral elements of software systems.

Uploaded by

Shikha Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views14 pages

unit 1 uml oops

The document discusses the significance of UML (Unified Modeling Language) modeling in software development, emphasizing its role in visualizing, specifying, and documenting systems. It outlines the principles of UML modeling, including the importance of model selection, precision levels, and the necessity of multiple models to capture different aspects of a system. Additionally, it provides an overview of various UML diagrams used to represent both structural and behavioral elements of software systems.

Uploaded by

Shikha Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Why UML Modeling?

Why UML Modeling?


Importance of Modeling
Principles of UML Modeling
Related Links
To architect a dog house can be done by one person. It involves a simple process, performed
with basic tools such as nails, hammer, saw, tape etc. In few hours you end with a house for
dog and can do with no one else's help. Modeling effort is minimal or sometimes
unnecessary.
If you want to build a house for your family with same things, is it possible? It requires
detailed planning, some sketches etc. Of Course, architecting a house is best achieved by a
team. It requires detailed modelling, well-defined processes and powerful tools.
What about a high rise building? Modeling is no doubt a critical part of any construction
project!

And software development? Grady Booch said:


"Modeling is a central part of all the activities that lead up to the deployment of good
software. We build models to communicate the desired structure and behavior of our
system. We build models to visualize and control the system's architecture. We build models
to better understand the system we are building, often exposing opportunities for
simplification and reuse. And we build models to manage risk."
- Grady Booch, The Unified Modeling Language User Guide (2nd Edition)
Importance of Modelling:
Modeling is a proven & well accepted engineering techniques. In building architecture, we
develop architectural models of houses & high rises to help visualize the final products. In
Unified Modeling Language (UML), a model may be structural, emphasizing the
organization of the system or it may be behavioral, emphasizing the dynamics of the
system. A model is a simplification of reality, providing blueprints of a system. UML, in
specific:
Permits you to specify the structure or behavior of a system.
Helps you visualize a system.
Provides template that guides you in constructing a system.
Helps to understand complex system part by part.
Document the decisions that you have made.
We build model so that we can better understand the system we are developing. A model
may encompass an overview of the system under consideration, as well as a detailed
planning for system design, implementation and testing.
Principles of UML Modeling
1. The choice of model is important
The choice of what models to create has a profound influence on how a problem is attacked
and how a solution is shaped. We need to choose your models well.
The right models will highlight the most critical development problems.
Wrong models will mislead you, causing you to focus on irrelevant issues.
For Example: We can use different types of diagrams for different phases in software
development.

2. Every model may be expressed at different levels of precision


For Example,
If you are building a high rise, sometimes you need a 30,000-foot view for instance, to help
your investors visualize its look and feel.
Other times, you need to get down to the level of the studs for instance, when there's a tricky
pipe run or an unusual structural element.
3. The best models are connected to reality
All models simplify reality and a good model reflects important key characteristics.
4. No single model is sufficient
Every non-trivial system is best approached through a small set of nearly independent
models. Create models that can be built and studied separately, but are still interrelated. In
the case of a building:
You can study electrical plans in isolation
But you can also see their mapping to the floor plan and perhaps even their interaction
with the routing of pipes in the plumbing plan.
UML, short for Unified Modeling Language, is a standardized modeling language
consisting of an integrated set of diagrams, developed to help system and software
developers for specifying, visualizing, constructing, and documenting the artifacts of
software systems, as well as for business modeling and other non-software systems. The
UML represents a collection of best engineering practices that have proven successful in
the modeling of large and complex systems. The UML is a very important part of
developing object oriented software and the software development process. The UML
uses mostly graphical notations to express the design of software projects. Using the
UML helps project teams communicate, explore potential designs, and validate the
architectural design of the software. In this article, we will give you detailed ideas about
what is UML, the history of UML and a description of each UML diagram type, along
with UML examples.

What is Unified Modeling Language (UML)?

The goal of UML is to provide a standard notation that can be used by all object-oriented
methods and to select and integrate the best elements of precursor notations. UML has been
designed for a broad range of applications. Hence, it provides constructs for a broad range of
systems and activities (e.g., distributed systems, analysis, system design and deployment).

Object Modeling Technique OMT [James Rumbaugh 1991] - was best for analysis and data-
intensive information systems.

Why UML

As the strategic value of software increases for many companies, the industry looks for
techniques to automate the production of software and to improve quality and reduce cost and
time-to-market. These techniques include component technology, visual programming, patterns
and frameworks. Businesses also seek techniques to manage the complexity of systems as they
increase in scope and scale. In particular, they recognize the need to solve recurring
architectural problems, such as physical distribution, concurrency, replication, security, load
balancing and fault tolerance. Additionally, the development for the World Wide Web, while
making some things simpler, has exacerbated these architectural problems. The Unified
Modeling Language (UML) was designed to respond to these needs. The primary goals in the
design of the UML summarize by Page-Jones in Fundamental Object-Oriented Design in UML
as follows:

Provide users with a ready-to-use, expressive visual modeling language so they can develop and
exchange meaningful models.

Provide extensibility and specialization mechanisms to extend the core concepts.

Be independent of particular programming languages and development processes.

Provide a formal basis for understanding the modeling language.

Encourage the growth of the OO tools market.

Support higher-level development concepts such as collaborations, frameworks, patterns and


components.

Integrate best practices.

UML - An Overview

Before we begin to look at the theory of the UML, we are going to take a very brief run through
some of the major concepts of the UML.

The first thing to notice about the UML is that there are a lot of different diagrams (models) to
get used to. The reason for this is that it is possible to look at a system from many different
viewpoints. A software development will have many stakeholders playing a part.

For Example:

Analysts

Designers

Coders

Testers

QA

The Customer

Technical Authors

All of these people are interested in different aspects of the system, and each of them require a
different level of detail. For example, a coder needs to understand the design of the system and
be able to convert the design to a low level code. By contrast, a technical writer is interested in
the behavior of the system as a whole, and needs to understand how the product functions. The
UML attempts to provide a language so expressive that all stakeholders can benefit from at
least one UML diagram.

Here's a quick look at each one of these 13 diagrams in as shown in the UML 2 Diagram
Structure below:Structure diagrams show the static structure of the system and its parts on
different abstraction and implementation levels and how they are related to each other. The
elements in a structure diagram represent the meaningful concepts of a system, and may
include abstract, real world and implementation concepts, there are seven types of structure
diagram as follows:

Class Diagram
Component Diagram
Deployment Diagram
Object Diagram
Package Diagram
Composite Structure Diagram
Profile Diagram

Behavior diagrams show the dynamic behavior of the objects in a system, which can be described as
a series of changes to the system over time, there are seven types of behavior diagrams as follows:
Use Case Diagram
Activity Diagram
State Machine Diagram
Sequence Diagram
Communication Diagram
Interaction Overview Diagram
Timing Diagram
What is a Class Diagram?
The class diagram is a central modeling technique that runs through nearly all object-oriented
methods. This diagram describes the types of objects in the system and various kinds of static
relationships which exist between them.
Relationships
There are three principal kinds of relationships which are important:
Association - represent relationships between instances of types (a person works for a company,
a company has a number of offices.
Inheritance - the most obvious addition to ER diagrams for use in OO. It has an immediate
correspondence to inheritance in OO design.
Aggregation - Aggregation, a form of object composition in object-oriented design.
Class Diagram Example

For more details about Class Diagram, please read the article What is Class Diagram?
What is Component Diagram?
In the Unified Modeling Language, a component diagram depicts how components are wired
together to form larger components or software systems. It illustrates the architectures of the
software components and the dependencies between them. Those software components
including run-time components, executable components also the source code components.
Component Diagram Example
For more details about Component Diagram, please read the article What is Component Diagram?
What is a Deployment Diagram?
The Deployment Diagram helps to model the physical aspect of an Object-Oriented software
system. It is a structure diagram which shows architecture of the system as deployment
(distribution) of software artifacts to deployment targets. Artifacts represent concrete elements
in the physical world that are the result of a development process. It models the run-time
configuration in a static view and visualizes the distribution of artifacts in an application. In
most cases, it involves modeling the hardware configurations together with the software
components that lived on.
Deployment Diagram Example

For more details about Deployment Diagram, please read the article What is Deployment Diagram?
What is an Object Diagram?
An object diagram is a graph of instances, including objects and data values. A static object
diagram is an instance of a class diagram; it shows a snapshot of the detailed state of a system at
a point in time. The difference is that a class diagram represents an abstract model consisting of
classes and their relationships. However, an object diagram represents an instance at a
particular moment, which is concrete in nature. The use of object diagrams is fairly limited,
namely to show examples of data structure.
Class Diagram vs Object Diagram - An Example
Some people may find it difficult to understand the difference between a UML Class Diagram
and a UML Object Diagram as they both comprise of named "rectangle blocks", with attributes
in them, and with linkages in between, which make the two UML diagrams look similar. Some
people may even think they are the same because in the UML tool they use both the notations
for Class Diagram and Object Diagram are put inside the same diagram editor - Class Diagram.
But in fact, Class Diagram and Object Diagram represent two different aspects of a code base.
In this article, we will provide you with some ideas about these two UML diagrams, what they
are, what are their differences and when to use each of them.
Relationship between Class Diagram and Object Diagram
You create "classes" when you are programming. For example, in an online banking system
you may create classes like 'User', 'Account', 'Transaction', etc. In a classroom management
system you may create classes like 'Teacher', 'Student', 'Assignment', etc. In each class, there
are attributes and operations that represent the characteristic and behavior of the class. Class
Diagram is a UML diagram where you can visualize those classes, along with their attributes,
operations and the inter-relationship.
UML Object Diagram shows how object instances in your system are interacting with each
other at a particular state. It also represents the data values of those objects at that state. In
other words, a UML Object Diagram can be seen as a representation of how classes (drawn in
UML Class Diagram) are utilized at a particular state.
If you are not a fan of those definition stuff, take a look at the following UML diagram
examples. I believe that you will understand their differences in seconds.
Class Diagram Example
The following Class Diagram example represents two classes - User and Attachment. A user can
upload multiple attachment so the two classes are connected with an association, with 0..* as
multiplicity on the Attachment side.

Object Diagram Example


The following Object Diagram example shows you how the object instances of User and
Attachment class "look like" at the moment Peter (i.e. the user) is trying to upload two
attachments. So there are two Instance Specification for the two attachment objects to be
uploaded.

For more details about Object Diagram, please read the article What is Object Diagram?
What is a Package Diagram?
Package diagram is UML structure diagram which shows packages and dependencies between
the packages. Model diagrams allow to show different views of a system, for example, as multi-
layered (aka multi-tiered) application - multi-layered application model.
Package Diagram Example
For more details about Package Diagram, please read the article What is Package Diagram?
What is a Composite Structure Diagram?
Composite Structure Diagram is one of the new artifacts added to UML 2.0. A composite
structure diagram is similar to a class diagram and is a kind of component diagram mainly used
in modeling a system at micro point-of-view, but it depicts individual parts instead of whole
classes. It is a type of static structure diagram that shows the internal structure of a class and
the collaborations that this structure makes possible.
This diagram can include internal parts, ports through which the parts interact with each other
or through which instances of the class interact with the parts and with the outside world, and
connectors between parts or ports. A composite structure is a set of interconnected elements
that collaborate at runtime to achieve some purpose. Each element has some defined role in the
collaboration.
Composite Structure Diagram Example

For more details about Composite Structure Diagram, please read the article What is Composite
Structure Diagram?
What is a Profile Diagram?
A profile diagram enables you to create domain and platform specific stereotypes and define the
relationships between them. You can create stereotypes by drawing stereotype shapes and relate
them with composition or generalization through the resource-centric interface. You can also
define and visualize tagged values of stereotypes.
Profile Diagram Example
For more details about Profile Diagram, please read the article What is Profile Diagram in UML?
What is a Use Case Diagram?
A use-case model describes a system's functional requirements in terms of use cases. It is a
model of the system's intended functionality (use cases) and its environment (actors). Use cases
enable you to relate what you need from a system to how the system delivers on those needs.
Think of a use-case model as a menu, much like the menu you'd find in a restaurant. By looking
at the menu, you know what's available to you, the individual dishes as well as their prices. You
also know what kind of cuisine the restaurant serves: Italian, Mexican, Chinese, and so on. By
looking at the menu, you get an overall impression of the dining experience that awaits you in
that restaurant. The menu, in effect, "models" the restaurant's behavior.
Because it is a very powerful planning instrument, the use-case model is generally used in all
phases of the development cycle by all team members.
Use Case Diagram Example
For more details about Use Case Diagram, please read the article What is Use Case Diagram?
What is an Activity Diagram?
Activity diagrams are graphical representations of workflows of stepwise activities and actions
with support for choice, iteration and concurrency. It describes the flow of control of the target
system, such as the exploring complex business rules and operations, describing the use case
also the business process. In the Unified Modeling Language, activity diagrams are intended to
model both computational and organizational processes (i.e. workflows).
Activity Diagram Example

For more details about Activity Diagram, please read the article What is Activity Diagram?
What is a State Machine Diagram?
A state diagram is a type of diagram used in UML to describe the behavior of systems which is
based on the concept of state diagrams by David Harel. State diagrams depict the permitted
states and transitions as well as the events that effect these transitions. It helps to visualize the
entire lifecycle of objects and thus help to provide a better understanding of state-based
systems.
State Machine Diagram Example
For more details about State Machine Diagram, please read the article What is State Machine
Diagram?
What is a Sequence Diagram?
The Sequence Diagram models the collaboration of objects based on a time sequence. It shows
how the objects interact with others in a particular scenario of a use case. With the advanced
visual modeling capability, you can create complex sequence diagram in few clicks. Besides,
some modeling tool such as Visual Paradigm can generate sequence diagram from the flow of
events which you have defined in the use case description.
Sequence Diagram Example

For more details about Sequence Diagram, please read the article What is Sequence Diagram?
What is a Communication Diagram?
Similar to Sequence Diagram, the Communication Diagram is also used to model the dynamic
behavior of the use case. When compare to Sequence Diagram, the Communication Diagram is
more focused on showing the collaboration of objects rather than the time sequence. They are
actually semantically equivalent, so some of the modeling tool such as, Visual Paradigm allows
you to generate it from one to the other.
Communication Diagram Example
For more details about Communication Diagram, please read the article What is Communication
Diagram?
What is Interaction Overview Diagram?
The Interaction Overview Diagram focuses on the overview of the flow of control of the
interactions. It is a variant of the Activity Diagram where the nodes are the interactions or
interaction occurrences. The Interaction Overview Diagram describes the interactions where
messages and lifelines are hidden. You can link up the "real" diagrams and achieve high degree
navigability between diagrams inside the Interaction Overview Diagram.
Interaction Overview Diagram Example
For more details about Interaction Overview Diagram, please read the article What is Interaction
Overview Diagram?
What is Timing Diagram?
Timing Diagram shows the behavior of the object(s) in a given period of time. Timing diagram
is a special form of a sequence diagram. The differences between timing diagram and sequence
diagram are the axes are reversed so that the time are increase from left to right and the
lifelines are shown in separate compartments arranged vertically.
Timing Diagram Example

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy