尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
Analysis vs Design
Software analysis and design includes all activities, which help the
transformation of requirement specification into implementation.
Requirement specifications specify all functional and non-functional
expectations from the software. These requirement specifications
come in the shape of human readable and understandable documents,
to which a computer has nothing to do.
Software analysis and design is the intermediate stage, which helps
human-readable requirements to be transformed into actual code.
Analysis phase concentrates on problem domain and clarifies all the
related concepts of problem. This helps for solid design activity.
Design phase starts with exploring the solution domain.
Sr. No. Parameters Analysis Design
1. Domain/Process
flow
Explores the problem domain and
applied the unified process and
tools to clarify the requirements.
Explores the solution
domain and applied the
unified process and tools to
formulate the system
design.
2. Involvement System analyst, business analyst System architects,
developers, system analysts
3. Outcomes Requirement specification
document (SRS)
Low level sys tem design or
detailed level design with
documentation
4. Components Use cases, use case stories,
analysis classes etc.
Class and object diagram,
component diagram, state
diagram etc.
5. Stakeholders System analysts, end users,
business analysts, product owners
System architects, System
analysts, developers,
project managers
Class Diagram
• What is class?
In static modelling, we capture static view of the system. The concepts
of problem are translated into designing constructs are called as
classes.
• What is object?
“A discret entity with a well-defined boundary that encapsulates state
and behavior; an instance of a class.” A system architect starts with
analyzing the requirements and identifying the use cases. The objects
are identified by keeping the use cases in mind. Classes are used to
declare the properties and behavior of objects.
• Class diagram is a static diagram. It represents the static view of an
application. Class diagram describes attributes & operations of a
class and also the constraints imposed on system. Class diagrams
are widely used in the modeling of object oriented systems because
they are the only UML diagrams, which can be mapped directly
with object-oriented languages.
• Class diagram shows a collection of classes, interfaces,
associations, collaborations, and constraints. It is also known as a
structural diagram.
• Purpose of Class Diagrams
- In software engineering, a class diagram in the UML is a type of
static structure diagram that describes the structure of a system by
showing the system's classes, their attributes, operations (or methods),
and the relationships among objects.
- The class diagram is the main building block of object
oriented modelling. It is used for general conceptual modelling of the
systematic of the application, and for detailed modelling translating
the models into programming code.
- Objects are similar kind belong to one class. The collection of
objects of similar characteristics is class. Class is prototype or
blueprint using objects are created.
- The properties or attributes held by objects are represented in class as
variables and behavior of objects are represented in class as operations
or methods.
- The following points should be remembered while drawing a class
diagram -
• The name of the class diagram should be meaningful to describe the
aspect of the system.
• Responsibility (attributes and methods) of each class should be
clearly identified
• For each class, minimum number of properties should be specified,
as unnecessary properties will make the diagram complicated.
• Use notes whenever required to describe some aspect of the
diagram. At the end of the drawing it should be understandable to
the developer/coder.
• Finally, before making the final version, the diagram should be
drawn on plain paper and reworked as many times as possible to
make it correct.
• Basic Class Diagram Symbols and Notations
Classes represent an abstraction of entities with common
characteristics. The notation of the classes with rectangles divided
into compartments. Place the name of the class in the first partition
(centered, bolded, and capitalized), list the attributes in the second
partition (left-aligned, not bolded, and lowercase), and write
operations into the third. The simple nation of the class is as shown
below
• Active Classes
Active classes initiate and control the flow of activity, while passive
classes store data and serve other classes. Illustrate active classes with
a thicker border.
• Visibility
Use visibility markers to signify who can access the information
contained within a class. Private visibility, denoted with a - sign, hides
information from anything outside the class partition. Public visibility,
denoted with a + sign, allows all other classes to view the marked
information. Protected visibility, denoted with a # sign, allows child
classes to access information they inherited from a parent class.
• Simple examples of classes in UML
• Relationships between classes
There are three types of relationships between the classes
1. Association 2. Composition and aggregation
3. Generalization and specialization
1. Association
Associations represent static relationships between classes. Place
association names above, on, or below the association line. Use a filled
arrow to indicate the direction of the relationship. Place roles near the
end of an association. Roles represent the way the two classes see each
other.
• Link: It is used to represent the association between the classes and
objects. Link represents instance of association.
• Multiplicity (Cardinality)
One important aspect of association is multiplicity that defines how
many instances of one class is associated with single instance of
another class.
Types of multiplicity association
a) One-to-one
b) One-to-many
c) Many-to-one
Multiplicity (Cardinality)
Place multiplicity notations near the ends of an association. These
symbols indicate the number of instances of one class linked to one
instance of the other class. For example, one company will have one
or more employees, but each employee works for just one company.
2. Composition and aggregation
Composition is a special type of aggregation that denotes a strong
ownership between Class A, the whole, and Class B, its part. Illustrate
composition with a filled diamond. Use a hollow diamond to represent
a simple aggregation relationship, in which the "whole" class plays a
more important role than the "part" class, but the two classes are not
dependent on each
other. The
diamond ends in
both composition
and aggregation
relationships point
toward the
"whole" class
(i.e., the aggregation).
3. Generalization and specialization
Generalization is another name for inheritance or an "is a"
relationship. It refers to a relationship between two classes where one
class is a specialized version of another. For example, Honda is a type
of car. So the class Honda would have a generalization relationship
with the class car.
Difference between Class
diagram and Object diagram
Parameters Class Diagram Object Diagram
Definition Class diagram captures the static
aspect of system to be designed.
Object diagram shows
behavioral relationship of
classes.
Dynamic change It does not include dynamic or
runtime change in the system
It captures dynamic or
runtime changes in the
state of system.
Data Class diagram includes variables
and operations
Object diagram the values
of variables and which
operation performed
Purpose It shows what objects in the
system
It shows how those objects
behave at run time
Analysis - Object & classes
finding analysis
• The UP (Unified Process) activity: Analyze a use case
The outputs from the UP workflow “Analyze a use case” are
analysis classes and use case realizations as shown in the
following figure
Figure. The
origin of
Analysis class
• What are analysis classes?
Analysis classes are classes that:
- represent a abstraction in the problem domain;
- should map on to real-world business concepts (and be carefully
named accordingly).
The problem domain is the domain in which the need for a software
system first arises. This is usually a specific area of the business such
as online selling or customer relationship management. However, it is
important to note that the problem domain might not be any specific
business activity at all, but might arise from a piece of physical
hardware that needs software to operate it – this is an embedded
system. Ultimately, all commercial software development serves some
business need, be that automating an existing business process, or
developing a new product that has a significant software component.
The most important aspect of an analysis class is that it should map in
a clear and unambiguous way on to some real-world business concept
such as customer, product, or account. However, this statement
assumes that the business concepts themselves are clear and
unambiguous and this is rarely the case. It is therefore the job of the
OO analyst to try to clarify confused or inappropriate business
concepts into something that can form the basis of an analysis class.
So the first step in building OO software is to clarify the problem
domain. It is important that all classes in the analysis model are
analysis classes rather than classes arising from design considerations
(the solution domain). When you get down to detailed design you may
find that analysis classes are ultimately refined into one or more
design classes.
The real goal of OO analysis is finding the classes of those objects. In
fact, finding the right analysis classes is the key to OO analysis and
design. If the classes are not right in analysis,
then the rest of the software engineering process, which is predicated
on the requirements and analysis workflows, will be in jeopardy. It is
therefore crucial to spend sufficient time in the analysis workflow to
ensure that the right set of analysis classes has been identified. This
time will be well spent, as it will almost certainly save time later.
• Anatomy of an analysis class
Analysis classes should present a very “high level” set of attributes.
Analysis class operations specify, at a high level, the key services that
the class must offer. In design they will become actual, implementable
methods. However, one high-level operation will often break down
into more than one method. We have already covered the UML syntax
for classes in detail, but in analysis only a small subset of that syntax
is actually used. Of course, the analyst is always free to add any
opinions felt to be necessary to make the model clearer. However, the
basic syntax of an analysis class always avoids implementation details.
After all, in analysis we are trying to capture the big picture.
A minimal form for an analysis class consists of the following.
• Name – this is mandatory.
• Attributes – attribute names are mandatory although only an
important subset of candidate attributes may be modeled at this
point. Attribute types are considered optional.
• Operations – in analysis, operations might just be very high-level
statements of the responsibilities of the class. Operation parameters
and return types are only shown where they are important for
understanding the model.
• Visibility – generally not shown.
• Labels (Stereotypes) – may be shown if they enhance the model.
• Marked (Tagged) values – may be shown if they enhance the model.
An example is given in Figure
• Finding classes
Finding analysis classes is on of the important activity in unified
process. There are two ways
1. Finding classes with the help of noun/verb analysis
2. Finding class with the help of CRC analysis
1. Finding classes using noun/verb analysis
Noun/verb analysis is a very simple way of analyzing text to try to
find classes, attributes, and responsibilities. In essence, nouns and
noun phrases in the text indicate classes or attributes of classes, and
verbs and verb phrases indicate responsibilities or operations of a
class.
We have to be very careful if the problem domain is poorly understood
and defined. In this case, try to collect as much information about the
domain from as many people as possible. Look for similar problem
domains outside your organization.
Perhaps the trickiest aspect of noun/verb analysis is finding the
“hidden” classes. These are classes which are intrinsic to the problem
domain, but which might never be mentioned explicitly. For example,
in a reservation system for a holiday company, you will hear the
stakeholders talk about reservations, bookings, etc., but the single
most important abstraction, Order, may never be mentioned explicitly
if it does not exist in current business systems.
Noun/verb analysis procedure The first step in noun/verb analysis is to
collect as much relevant information as possible. Suitable sources of
information are:
• the Supplementary Requirements Specification (if it exists);
• use cases;
• the project Glossary;
• anything else (architecture, vision documents, etc.).
After collecting the documentation, analyze it in a very simple way by
highlighting (or recording in some other way) the following:
• nouns – e.g. flight;
• noun phrases – e.g. flight number;
• verbs – e.g. allocate;
• verb phrases – e.g. verify credit card.
Nouns and noun phrases may indicate classes or class attributes. Verbs
and verb phrases may indicate responsibilities of classes.
If you come across any terms that you don’t understand during this
process, seek immediate clarification from a domain expert and add
the term to the Project Glossary. Take the list of nouns, noun phrases,
verbs, and verb phrases and use the Project Glossary to resolve any
synonyms and homonyms. This creates a list of candidate classes,
attributes, and responsibilities. Once you have this list of candidate
classes, attributes, and responsibilities, you make a tentative allocation
of the attributes and responsibilities to the classes.
2. Finding classes using CRC (Class Responsibility Collaborator)
analysis
A very good (and fun) way to get user involvement in finding classes
is to use CRC analysis – this stands for class, responsibilities, and
collaborators. This technique uses the world’s most powerful analysis
tool, the sticky note! So popular is the CRC method that there is a
(possibly apocryphal) story that at one point a company actually
marketed sticky notes already marked out with class name,
responsibilities, and collaborators. You begin by marking up some
sticky notes as shown Figure
The note is divided into three compartments – in the top
compartment you record the name of the candidate class; in the
left compartment, the responsibilities; and in the right the
collaborators. Collaborators are other classes that may
collaborate with this class to realize a piece of system
functionality. The collaborators compartment provides a way of
recording relationships between classes. Another way to capture
relationships (which we prefer) is to stick the notes on a
whiteboard, and draw lines between the collaborating classes.
CRC analysis procedure
The CRC analysis procedure is straightforward and the key is to
separate information gathering from information analysis. CRC
is therefore best run as a two-phase activity.
Phase 1: Brainstorm – gather the information
The participants are OO analysts, stakeholders, and domain experts.
The procedure is as follows.
1 Explain that this is a true brainstorm.
1.1 All ideas are accepted as good ideas.
1.2 Ideas are recorded but not debated – never argue about something,
just write it down and then move on. Everything will be analyzed later.
2 Ask the team members to name the “things” that operate in their
business domain – e.g. customer, product.
2.1 Write each thing on a sticky note – it is a candidate class, or
attribute of a class.
2.2 Stick the note on a wall or whiteboard.
3 Ask the team to state responsibilities that those things might have –
record these in the responsibilities compartment of the note.
4 Working with the team, try to identify classes that might work
together. Rearrange the notes on the whiteboard to reflect this
organization and draw lines between them. Alternatively, record
collaborators in the collaborators compartment of the note.
Phase 2: Analyze information
The participants are OO analysis, and domain experts. How do you
decide which sticky notes should become classes and which should
become attributes? analysis classes must represent a crisp abstraction
in the problem domain. Certain sticky notes will represent key
business concepts and clearly need to become classes. Other notes
may become classes or attributes. If a note logically seems to be a part
of another note, this is a good indication that it represents an attribute.
Also, if a note doesn’t seem to be particularly important, or has very
little interesting behavior, see if it can be made an attribute of another
class.
If in doubt about a note just make it a class. The important point is to
make a best guess and then drive this process to closure – you can
always refine the model later.
Refining analysis relationships
When you move to design, you have to refine the relationships between
analysis classes into relationships between design classes. Many of the
relationships captured in analysis are not directly implementable as they
stand, and they must be made so. For example, there is no commonly used
OO programming language that directly supports bidirectional associations,
association classes, or many-to-many associations. To create a design model,
you have to specify how these associations are going to be realized. Refining
analysis associations to design associations involves several procedures:
• refining associations to aggregation or composition relationships
• implementing association classes
• implementing one-to-many associations
• implementing many-to-many associations
• implementing bidirectional associations.
All design associations must have:
• navigability
• multiplicity on both ends
All design associations should have a role name on at least the target end.
Inheritance and Polymorphism
Before we can discuss inheritance and polymorphism, we need to have
a solid understanding of the idea of generalization. Generalization is a
relationship between a more general element and a more specific
element, where the more specific element is entirely consistent with
the more general element, but contains more information.
Conceptually, generalization is a very simple idea – you are already
very familiar with the notion of general things such as a tree, and then
more specific things such as an oak tree, which is a particular type of
tree. You have already seen generalization applied to use cases and
actors, and now you will see how it is applied to classes. In fact,
generalization applies to all
classifiers and to some other
modeling elements such as
associations, states, events, and
collaborations.
• Class inheritance
When you arrange classes into a generalization hierarchy as shown
previous Figure you implicitly have inheritance between the classes
where the subclasses inherit all the features of their super classes. To be
more specific, subclasses inherit:
- Attributes - operations
- Relationships - constraints
Subclasses can also add new features and override superclass
operations.
Overriding
In the example as shown in Figure the Shape subclasses Square and
Circle inherit all of the attributes, operations, and constraints from the
Shape superclass. This means that although you don’t see these
features in the subclasses, they are actually implicitly there. We say
that Square and Circle are a type of Shape.
Notice that the operations draw( ) and getArea( ) defined in Shape can
in no way be appropriate for the subclasses. Square and Circle need to
implement their own draw( ) and getArea( ) operations that override
the default operations supplied by the parent and provide a more
appropriate behavior as shown in figure. the subclasses Square and
Circle have provided their own draw( ) and getArea( ) operations that
have the appropriate behaviors
To override a superclass operation, a subclass must provide an
operation with exactly the same signature as the superclass operation it
wishes to override. UML defines operation signature as the operation
name, its return type, and the types of all of the parameters listed in
order. The parameter names don’t count, as they are just a convenient
way of referring to a specific parameter within an operation body, and
so are not really part of the signature.
Abstract operations and classes
We can specify that an operation lacks an implementation by making it
an abstract operation. In UML you do this simply by writing the
operation name in italics. When you think about it, a class with one or
more abstract operations is incomplete as there are some operations
that don’t have an implementation. This means that you can’t
instantiate such classes and they are therefore known as abstract
classes. You write the class name in italics to show that it is abstract.
In the example as shown in the figure below, we have the abstract
class shape which has two abstract operations Shape::draw( g :
Graphics ) and Shape::getArea( ) : int. The implementations for these
operations are provided by both the Square and the Circle subclasses.
Although Shape is incomplete, and can’t be instantiated, both of its
subclasses provide the missing implementations, are complete and can
be instantiated. Any class that can be instantiated is known as a
concrete class.
The operation getBoundingArea( ) is a concrete operation of Shape
because the bounding area of every kind of Shape is calculated in the
exactly the same way – it is always the width of the shape multiplied
by its height. There are a couple of big advantages of using abstract
classes and operations.
• We can define a set of abstract operations in the abstract superclass
that must be implemented by all Shape subclasses. You can think of
this as defining a “contract” that all concrete Shape subclasses must
implement.
• We can write code to manipulate Shapes and then substitute Circle,
Square and other Shape subclasses as appropriate. According to the
substitutability principle, code written to manipulate Shapes should
also work for all Shape subclasses.
Level of abstraction
Before we get into polymorphism, it’s a good idea to understand
something about levels of abstraction. What’s wrong with the model in
Figure
The answer is “levels of abstraction”. A generalization hierarchy
defines a set of levels of abstraction from the most general at the top to
the most specific at the bottom. You should always try to maintain a
uniform level of abstraction at each level of the generalization
hierarchy. In the example above, we have not achieved this. JaguarXJS
is a type of car. Clearly this is a lower level of abstraction than Truck.
Polymorphism
Polymorphism means “many forms”. A polymorphic operation is one
that has many implementations. You have already seen two
polymorphic operations in the Shape example. The abstract
operations draw( ) and getArea( ) in the Shape class have two
different implementations – an implementation in the Square class
and a different implementation in the Circle class. The operations
have “many forms” and are therefore polymorphic. Following figure
illustrates polymorphism perfectly. We define an abstract Shape class
with abstract operations draw( ) and getArea( ).
Clearly the implementation of draw( ) and getArea( ) will be different for
Squares and Circles. The draw( ) operation will draw a square for objects of
the Square class, and will draw a circle for objects of the Circle class. You
can see that the getArea( ) operation will also have different
implementations. It will return width*height for a square and π*r2 for a
circle. This is the essence of polymorphism – objects of different classes
have operations with the same signature but different implementations.
Encapsulation, inheritance, and polymorphism are the “three pillars” of OO.
Polymorphism allows you to design simpler systems that can more easily
accommodate change because it allows you to treat different objects in the
same way.
Object Diagram
An object diagram is a diagram that shows objects and their
relationships at a point in time. It is like a snapshot of part of an
executing OO system at a particular instant, showing the objects and
the links between them.
A link is a semantic connection between two objects that allows
messages to be sent from one object to the other. Many links that join
those objects together. Messages are passed back and forth between
objects over these links. On receipt of a message, an object will invoke
the corresponding method.
Objects that are connected by links may adopt various roles relative to
each other. As shown in the following figure, you can see that the jim
object adopts the role of chairman in its link with the
downHillSkiClub object. You indicate this on the object diagram by
placing the role name at the appropriate end of the link. You can put
role names at either or both ends of a link. In this case, the
downHillSkiClub object always plays the role of “club” and so there is
no real point in showing this on the diagram – it would not really add
anything to our understanding of the object relationships. Figure tells
us that at a particular point in time, the object jim is playing the role of
chairman. However, it is important to realize that links are dynamic
connections between objects. the chairman role may pass at some point
to fab or christian, and we could easily create an object diagram to
show this new state of affairs.
Normally, a single link connects exactly two objects as shown in
Figure. However, UML does allow a single link to connect more than
two objects. This is known as an n-ary link and is shown as a diamond
with a path to each participating object.
We can specify that the link only goes one way by placing an
arrowhead on the appropriate end of the line. For example, Figure
shows that the link between :PersonDetails and :Address is
unidirectional. This means that the :PersonDetails object has an object
reference to the :Address object, but not vice versa. Messages can only
be sent from :PersonDetails to :Address.
Paths
UML symbols, such as the object icon, use case icon, and class icon,
are connected to other symbols by paths. A path is a “connected series
of graphic segments” joining two or more symbols. There are two
styles for drawing paths:
• orthogonal – where the path consists of a series of horizontal and
vertical segments
• oblique – where the path is a series of one or more sloping lines
(shown in below figure)
In above Figure, we have adopted the orthogonal path style, and the
paths have been combined into a tree. You can only combine paths that
have the same properties. In this case, all the paths represent links and
so we can legally combine them.
Component diagram- Interfaces
& components
• Component based software architecture
Component-based architecture focuses on the decomposition of the
design into individual functional or logical components that represent
well-defined communication interfaces containing methods, events,
and properties. It provides a higher level of abstraction and divides the
problem into sub-problems, each associated with component
partitions. The primary objective of component-based architecture is
to ensure component reusability. A component encapsulates
functionality and behaviors of a software element into a reusable and
self-deployable binary unit.
Component-oriented software design has many advantages over the
traditional object-oriented approaches such as −
- Reduced time in market and the development cost by reusing
existing components.
- Increased reliability with the reuse of the existing components.
• What is a Component?
A component is a modular, portable, replaceable, and reusable set
of well-defined functionality that encapsulates its
implementation and exporting it as a higher-level interface.
A component is a software object, intended to interact with other
components, encapsulating certain functionality or a set of
functionalities. It has an obviously defined interface and
conforms to a recommended behavior common to all
components within an architecture.
• Views of a Component
A component can have three different views
1. object-oriented view
2. conventional view
3. process-related view
1. Object-oriented view
A component is viewed as a set of one or more cooperating classes.
Each problem domain class (analysis) and infrastructure class (design)
are explained to identify all attributes and operations that apply to its
implementation. It also involves defining the interfaces that enable
classes to communicate and cooperate.
2. Conventional view
It is viewed as a functional element or a module of a program that
integrates the processing logic, the internal data structures that are
required to implement the processing logic and an interface that
enables the component to be invoked and data to be passed to it.
3. Process-related view
In this view, instead of creating each component from scratch, the
system is building from existing components maintained in a library.
As the software architecture is formulated, components are selected
from the library and used to populate the architecture.
A component diagram, also known as a UML component diagram,
describes the organization and wiring of the physical components in a
system. Component diagrams are often drawn to help model
implementation details and double-check that every aspect of the
system's required functions is covered by planned development.
• Basic Component Diagram Symbols & Notations
Component
A component is a logical unit block of the system, a slightly higher
abstraction than classes. It is represented as a rectangle with a smaller
rectangle in the upper right corner with tabs or the word written above
the name of the component to help distinguish it from a class.
Interface
An interface (small circle or semi-circle on a stick) describes a group
of operations used (required) or created (provided) by components. A
full circle represents an interface created or provided by the
component. A semi-circle represents a required interface, like a
person's input.
Dependencies
Draw dependencies among components using dashed arrows.
Port
Ports are represented using a square along the edge of the system or a
component. A port is often used to help expose required and provided
interfaces of a component.
How to Draw a Component Diagram
• Take stock of everything needed to implement the planned system.
• Create a visual for each of the components.
• Describe the organization and relationships between components
using interfaces, ports, and dependencies.
Deployment Diagrams
A deployment diagram shows the physical configuration of the system
in terms of physical nodes and physical connections between the nodes,
such as network connections. A node is shown as a cube, and the
connection is shown as a line joining the nodes. A deployment diagram is
essentially a class diagram that focuses on the system’s nodes.
The term Deployment itself describes the purpose of the diagram.
Deployment diagrams are used for describing the hardware components,
where software components are deployed. Component diagrams and
deployment diagrams are closely related. Component diagrams are used
to describe the components and deployment diagrams shows how they
are deployed in hardware.
Most of the UML diagrams are used to handle logical components but
deployment diagrams are made to focus on the hardware topology of a
system. Deployment diagrams are used by the system engineers. The
purpose of deployment diagrams can be described as −
• Visualize the hardware topology of a system.
• Describe the hardware components used to deploy software
components.
• Describe the runtime processing nodes.
How to Draw a Deployment Diagram?
Node
There are two types of nodes in a deployment diagram. The first are
device nodes--computing resources that have processing capabilities
and the ability to execute programs. Some examples of device nodes
are a PC, laptop, or mobile phone. The second type of node is called
an execution environment node, or EEN. An EEN is any computer
system that resides within a device node. It could be an operating
system, a JVM, or another servlet container.
Database
Represents any data stored by the deployed system. In the example,
the database is represented as just another node, but sometimes you
will see this shape as a database.
Other Shapes
Communication path A straight line that represents communication
between two device nodes.
Artifacts A box with the header "<<artifact>>" and then the name of
the file.
Package A package is a file shaped box that groups together all the
device nodes to encapsulate the entire deployment.
Component UML Component diagram notations are going to be the
same here as in the component diagram section.
Hierarchical Node
Hierarchical nodes can be modeled using composition or by defining
an internal structure. Internal structure of the node is defined in terms
of parts & connectors. Parts of the node could be only nodes.
Execution environment is usually a part of a general node or
<<device>> which represents the physical hardware environment on
which this execution environment resides. Execution environments can
be nested (e.g., a database execution environment may be nested in an
operating system execution environment).
Device
A device is a node which represents a physical computational resource
with processing capability upon which artifacts may be deployed for
execution.
A device is rendered as a node (perspective, 3-dimensional view of a
cube) annotated with keyword «device».
UML provides no standard stereotypes for devices. Examples of non-
normative stereotypes for devices are:
«application server»
«client workstation»
«mobile device»
«embedded device»
Device may be depicted using custom icon. Profiles, stereotypes and tagged
values could be used to provide custom icons and properties for the devices.
Deployment diagrams can be used −
• To model the hardware topology of a system.
• To model the embedded system.
• To model the hardware details for a client/server system.
• To model the hardware details of a distributed application.
• For Forward and Reverse engineering.
Figure.
application
deployment to
Android.
Package Diagram
Packages in software are used to group logically similar kind of
elements. Packages are used to group similar classes.
We have studied Use case packages are used for grouping logically
similar kind of use cases
at one place to handle
the complexity.
Package diagram is UML structure diagram which shows
packages and dependencies between the packages.
Package
• Package is a namespace used to group together elements that are
semantically related and might change together. It is a general
purpose mechanism to organize elements into groups to provide
better structure for system model.
• Owned members of a package should all be package able elements.
If a package is removed from a model, so are all the
elements owned by the package. Package by itself is package able
element, so any package could be also a member of other packages.
• As a namespace, a package can import either individual members
of other packages or all the members of other packages. Package
can also be merged with other packages.
• A package is rendered as a tabbed folder as shown in the following
figure - a rectangle with a small tab attached to the left side of the
top of the rectangle. If the members of the package are not shown
inside the package rectangle, then the name of the package should
be placed inside.
The members of the package may be shown within the boundaries of
the package. In this case the name of the package should be placed on
the tab. A diagram showing a package with content is allowed to show
only a subset of the contained elements according to some criterion.
Members of the package may be shown outside of the package by
branching lines from the package to the members. A plus sign (+)
within a circle is drawn at the end attached to the namespace
(package). This notation for packages is semantically equivalent to
composition (which is shown using solid diamond.)
The elements that can be referred to within a package using non-
qualified names are:
• owned elements,
• imported elements, and
• elements in enclosing (outer) namespaces.
Owned and imported elements may have a visibility that determines
whether they are available outside the package. If an element that is
owned by a package has visibility, it could be
only public or private visibility. Protected or package visibility is not
allowed. The visibility of a package element may be indicated by
preceding the name of the element by a visibility symbol ("+" for
public and "-" for private).
• Package URI Attribute
Package has optional URI attribute which serves as unique
identifier of the package. This attribute was introduced in UML
2.4 mostly to support exchange of profiles using XMI. The URI
attribute of a package may be rendered in the form {uri=<uri>} after
the package name.
• Package Template
Package can be used as a template for other packages. Package
element can be used as a template parameter. A package template
parameter may refer to any element owned or used by the package
template, or templates nested within it.
A package may be bound to one or more template packages. When
several bindings are applied the result of bindings is produced by
taking the intermediate results and merging them into the combined
result using package merge.
• Package able Element
Package able element is a named element that may be owned directly
by a package. Some examples of package able elements are:
- Type - Classifier
- Class - Use case
- Component etc.
Package able element by itself has no notation (Element import).
Element import is directed relationship between an importing
namespace and imported package able element. It allows the element
to be referenced using its name without a qualifier. An element import
is used to selectively import individual elements without relying on a
package import.
The name of the package able element or its alias is to be added to the
namespace of the importing namespace. It works by reference, which
means that it is not possible to add features to the element import
itself, but it is possible to modify the referenced element in the
namespace from which it was imported.
It is possible to control whether the imported element can be further
imported by other namespaces using either element or package
imports. The visibility of the element import may be either the same or
more restricted than that of the imported element. The visibility of an
element import is either public or private.
An element import is shown using a dashed arrow with an open
arrowhead from the importing namespace to the imported
element. Note, that though it looks exactly like dependency and
usage relationships, it is a completely separate directed relationship.
The keyword «import» is shown near the dashed arrow if the
visibility of import is public while the keyword «access» is used to
indicate private visibility. If the imported element is not a package,
the keyword may optionally be preceded by element, i.e., «element
import».
Figure. package diagram elements - package, import, access,
use, merge
Various examples of Class diagram
Figure. class diagram example for the Abstract Factory Design
Pattern
Class Diagram for Hotel Management System
Class Diagram for ATM machine
Various examples of Component diagram
Figure. Online shopping UML component diagram example with three
related subsystems – Web Store, Warehouses, and Accounting
Figure.
component
diagram for a
product using
Sentinel HASP
Software
Licensing
Security Solution
Various examples of Deployment
diagram
Figure. networking diagram for web application
Figure. home networking diagram - cable modem, wireless router,
various computers and devices
Figure. deployment diagram for Apple iTunes
Figure. deployment diagram with hardware load balancing of J2EE
servers
Various examples of Package diagram
Figure.
package
diagram
representi
ng major
interfaces
and
classes
of Java™
Servlet
2.5 API
Figure. package diagram elements - package, import, access,
use, merge
Figure. package template example for the Data Transfer
Object design pattern
Figure. package diagram of multi layered web application

More Related Content

What's hot

Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)
Gajeshwar Bahekar
 
Class diagram- UML diagram
Class diagram- UML diagramClass diagram- UML diagram
Class diagram- UML diagram
Ramakant Soni
 
Dynamic modeling
Dynamic modelingDynamic modeling
Dynamic modeling
Preeti Mishra
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
Asraa Batool
 
Simultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color ImagesSimultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color Images
Cristina Pérez Benito
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
Rishabh Soni
 
Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)
Manoj Reddy
 
Srs sample
Srs sampleSrs sample
Srs sample
Prakash Dhanasekar
 
Agile and non agile
Agile and non agileAgile and non agile
Agile and non agile
AnnaGodorogea
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
Nadia_Nazeer
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
LOKENDRA PRAJAPATI
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
Amith Tiwari
 
Improving of software processes
Improving of software processesImproving of software processes
Improving of software processes
REHMAT ULLAH
 
unit 3 Design 1
unit 3 Design 1unit 3 Design 1
unit 3 Design 1
TharuniDiddekunta
 
Illumination Models & Shading
Illumination Models & ShadingIllumination Models & Shading
Elaboration and domain model
Elaboration and domain modelElaboration and domain model
Elaboration and domain model
Vignesh Saravanan
 
raster and random scan
raster and random scanraster and random scan
raster and random scan
Sonia Pahuja
 
Unit 2
Unit 2Unit 2
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagram
Baskarkncet
 
Introduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLABIntroduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLAB
Ray Phan
 

What's hot (20)

Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)
 
Class diagram- UML diagram
Class diagram- UML diagramClass diagram- UML diagram
Class diagram- UML diagram
 
Dynamic modeling
Dynamic modelingDynamic modeling
Dynamic modeling
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
 
Simultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color ImagesSimultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color Images
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
 
Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)
 
Srs sample
Srs sampleSrs sample
Srs sample
 
Agile and non agile
Agile and non agileAgile and non agile
Agile and non agile
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
 
Improving of software processes
Improving of software processesImproving of software processes
Improving of software processes
 
unit 3 Design 1
unit 3 Design 1unit 3 Design 1
unit 3 Design 1
 
Illumination Models & Shading
Illumination Models & ShadingIllumination Models & Shading
Illumination Models & Shading
 
Elaboration and domain model
Elaboration and domain modelElaboration and domain model
Elaboration and domain model
 
raster and random scan
raster and random scanraster and random scan
raster and random scan
 
Unit 2
Unit 2Unit 2
Unit 2
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagram
 
Introduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLABIntroduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLAB
 

Similar to SMD Unit ii

Object oriented analysis and design unit- iv
Object oriented analysis and design unit- ivObject oriented analysis and design unit- iv
Object oriented analysis and design unit- iv
Shri Shankaracharya College, Bhilai,Junwani
 
Software Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdfSoftware Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdf
MeagGhn
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2
Sisir Ghosh
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
VivekChaudhary93
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
Raj Thilak S
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational Rose
Munaam Munawar
 
OOP_Module 2.pptx
OOP_Module 2.pptxOOP_Module 2.pptx
OOP_Module 2.pptx
PrasenjitKumarDas2
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
himanshu_airon
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
Eliza Wright
 
Requirements modeling
Requirements modelingRequirements modeling
Requirements modeling
AnanthiP8
 
UNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxUNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptx
viju001
 
432
432432
classdiagram.pptx
classdiagram.pptxclassdiagram.pptx
classdiagram.pptx
RahulGautam663736
 
Uml
UmlUml
Slideshow on the notes of software engineering
Slideshow on the notes of software engineeringSlideshow on the notes of software engineering
Slideshow on the notes of software engineering
erickbaldskie
 
Design UML diagrams
Design UML diagramsDesign UML diagrams
Design UML diagrams
Neeraj Kaushik
 
Design UML diagrams
Design UML diagramsDesign UML diagrams
Design UML diagrams
Neeraj Kaushik
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software Engineering
Amit Singh
 
UML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptxUML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptx
Nwabueze Obioma
 
Uml diagrams
Uml diagramsUml diagrams

Similar to SMD Unit ii (20)

Object oriented analysis and design unit- iv
Object oriented analysis and design unit- ivObject oriented analysis and design unit- iv
Object oriented analysis and design unit- iv
 
Software Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdfSoftware Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdf
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational Rose
 
OOP_Module 2.pptx
OOP_Module 2.pptxOOP_Module 2.pptx
OOP_Module 2.pptx
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
 
Requirements modeling
Requirements modelingRequirements modeling
Requirements modeling
 
UNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxUNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptx
 
432
432432
432
 
classdiagram.pptx
classdiagram.pptxclassdiagram.pptx
classdiagram.pptx
 
Uml
UmlUml
Uml
 
Slideshow on the notes of software engineering
Slideshow on the notes of software engineeringSlideshow on the notes of software engineering
Slideshow on the notes of software engineering
 
Design UML diagrams
Design UML diagramsDesign UML diagrams
Design UML diagrams
 
Design UML diagrams
Design UML diagramsDesign UML diagrams
Design UML diagrams
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software Engineering
 
UML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptxUML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptx
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 

Recently uploaded

Data Communication and Computer Networks Management System Project Report.pdf
Data Communication and Computer Networks Management System Project Report.pdfData Communication and Computer Networks Management System Project Report.pdf
Data Communication and Computer Networks Management System Project Report.pdf
Kamal Acharya
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
gapboxn
 
Kandivali Call Girls ☑ +91-9967584737 ☑ Available Hot Girls Aunty Book Now
Kandivali Call Girls ☑ +91-9967584737 ☑ Available Hot Girls Aunty Book NowKandivali Call Girls ☑ +91-9967584737 ☑ Available Hot Girls Aunty Book Now
Kandivali Call Girls ☑ +91-9967584737 ☑ Available Hot Girls Aunty Book Now
SONALI Batra $A12
 
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
sonamrawat5631
 
paper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdfpaper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdf
ShurooqTaib
 
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC ConduitThe Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
Guangdong Ctube Industry Co., Ltd.
 
An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
DharmaBanothu
 
Covid Management System Project Report.pdf
Covid Management System Project Report.pdfCovid Management System Project Report.pdf
Covid Management System Project Report.pdf
Kamal Acharya
 
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
hotchicksescort
 
Intuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sdeIntuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sde
ShivangMishra54
 
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl LucknowCall Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
yogita singh$A17
 
Literature review for prompt engineering of ChatGPT.pptx
Literature review for prompt engineering of ChatGPT.pptxLiterature review for prompt engineering of ChatGPT.pptx
Literature review for prompt engineering of ChatGPT.pptx
LokerXu2
 
Lateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptxLateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptx
DebendraDevKhanal1
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
Lubi Valves
 
Online train ticket booking system project.pdf
Online train ticket booking system project.pdfOnline train ticket booking system project.pdf
Online train ticket booking system project.pdf
Kamal Acharya
 
Basic principle and types Static Relays ppt
Basic principle and  types  Static Relays pptBasic principle and  types  Static Relays ppt
Basic principle and types Static Relays ppt
Sri Ramakrishna Institute of Technology
 
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
nonods
 
CSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdfCSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdf
Ismail Sultan
 
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine
 
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Tsuyoshi Horigome
 

Recently uploaded (20)

Data Communication and Computer Networks Management System Project Report.pdf
Data Communication and Computer Networks Management System Project Report.pdfData Communication and Computer Networks Management System Project Report.pdf
Data Communication and Computer Networks Management System Project Report.pdf
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
Kandivali Call Girls ☑ +91-9967584737 ☑ Available Hot Girls Aunty Book Now
Kandivali Call Girls ☑ +91-9967584737 ☑ Available Hot Girls Aunty Book NowKandivali Call Girls ☑ +91-9967584737 ☑ Available Hot Girls Aunty Book Now
Kandivali Call Girls ☑ +91-9967584737 ☑ Available Hot Girls Aunty Book Now
 
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
🔥Young College Call Girls Chandigarh 💯Call Us 🔝 7737669865 🔝💃Independent Chan...
 
paper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdfpaper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdf
 
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC ConduitThe Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
 
An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
 
Covid Management System Project Report.pdf
Covid Management System Project Report.pdfCovid Management System Project Report.pdf
Covid Management System Project Report.pdf
 
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
 
Intuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sdeIntuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sde
 
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl LucknowCall Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
 
Literature review for prompt engineering of ChatGPT.pptx
Literature review for prompt engineering of ChatGPT.pptxLiterature review for prompt engineering of ChatGPT.pptx
Literature review for prompt engineering of ChatGPT.pptx
 
Lateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptxLateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptx
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
 
Online train ticket booking system project.pdf
Online train ticket booking system project.pdfOnline train ticket booking system project.pdf
Online train ticket booking system project.pdf
 
Basic principle and types Static Relays ppt
Basic principle and  types  Static Relays pptBasic principle and  types  Static Relays ppt
Basic principle and types Static Relays ppt
 
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
一比一原版(psu学位证书)美国匹兹堡州立大学毕业证如何办理
 
CSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdfCSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdf
 
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024
 
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
 

SMD Unit ii

  • 1.
  • 2. Analysis vs Design Software analysis and design includes all activities, which help the transformation of requirement specification into implementation. Requirement specifications specify all functional and non-functional expectations from the software. These requirement specifications come in the shape of human readable and understandable documents, to which a computer has nothing to do. Software analysis and design is the intermediate stage, which helps human-readable requirements to be transformed into actual code. Analysis phase concentrates on problem domain and clarifies all the related concepts of problem. This helps for solid design activity. Design phase starts with exploring the solution domain.
  • 3. Sr. No. Parameters Analysis Design 1. Domain/Process flow Explores the problem domain and applied the unified process and tools to clarify the requirements. Explores the solution domain and applied the unified process and tools to formulate the system design. 2. Involvement System analyst, business analyst System architects, developers, system analysts 3. Outcomes Requirement specification document (SRS) Low level sys tem design or detailed level design with documentation 4. Components Use cases, use case stories, analysis classes etc. Class and object diagram, component diagram, state diagram etc. 5. Stakeholders System analysts, end users, business analysts, product owners System architects, System analysts, developers, project managers
  • 4. Class Diagram • What is class? In static modelling, we capture static view of the system. The concepts of problem are translated into designing constructs are called as classes. • What is object? “A discret entity with a well-defined boundary that encapsulates state and behavior; an instance of a class.” A system architect starts with analyzing the requirements and identifying the use cases. The objects are identified by keeping the use cases in mind. Classes are used to declare the properties and behavior of objects. • Class diagram is a static diagram. It represents the static view of an application. Class diagram describes attributes & operations of a class and also the constraints imposed on system. Class diagrams are widely used in the modeling of object oriented systems because they are the only UML diagrams, which can be mapped directly with object-oriented languages. • Class diagram shows a collection of classes, interfaces, associations, collaborations, and constraints. It is also known as a structural diagram.
  • 5. • Purpose of Class Diagrams - In software engineering, a class diagram in the UML is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects. - The class diagram is the main building block of object oriented modelling. It is used for general conceptual modelling of the systematic of the application, and for detailed modelling translating the models into programming code. - Objects are similar kind belong to one class. The collection of objects of similar characteristics is class. Class is prototype or blueprint using objects are created. - The properties or attributes held by objects are represented in class as variables and behavior of objects are represented in class as operations or methods. - The following points should be remembered while drawing a class diagram - • The name of the class diagram should be meaningful to describe the aspect of the system.
  • 6. • Responsibility (attributes and methods) of each class should be clearly identified • For each class, minimum number of properties should be specified, as unnecessary properties will make the diagram complicated. • Use notes whenever required to describe some aspect of the diagram. At the end of the drawing it should be understandable to the developer/coder. • Finally, before making the final version, the diagram should be drawn on plain paper and reworked as many times as possible to make it correct. • Basic Class Diagram Symbols and Notations Classes represent an abstraction of entities with common characteristics. The notation of the classes with rectangles divided into compartments. Place the name of the class in the first partition (centered, bolded, and capitalized), list the attributes in the second partition (left-aligned, not bolded, and lowercase), and write operations into the third. The simple nation of the class is as shown below
  • 7. • Active Classes Active classes initiate and control the flow of activity, while passive classes store data and serve other classes. Illustrate active classes with a thicker border.
  • 8. • Visibility Use visibility markers to signify who can access the information contained within a class. Private visibility, denoted with a - sign, hides information from anything outside the class partition. Public visibility, denoted with a + sign, allows all other classes to view the marked information. Protected visibility, denoted with a # sign, allows child classes to access information they inherited from a parent class.
  • 9. • Simple examples of classes in UML
  • 10.
  • 11.
  • 12. • Relationships between classes There are three types of relationships between the classes 1. Association 2. Composition and aggregation 3. Generalization and specialization 1. Association Associations represent static relationships between classes. Place association names above, on, or below the association line. Use a filled arrow to indicate the direction of the relationship. Place roles near the end of an association. Roles represent the way the two classes see each other.
  • 13. • Link: It is used to represent the association between the classes and objects. Link represents instance of association. • Multiplicity (Cardinality) One important aspect of association is multiplicity that defines how many instances of one class is associated with single instance of another class. Types of multiplicity association a) One-to-one b) One-to-many c) Many-to-one
  • 14. Multiplicity (Cardinality) Place multiplicity notations near the ends of an association. These symbols indicate the number of instances of one class linked to one instance of the other class. For example, one company will have one or more employees, but each employee works for just one company.
  • 15.
  • 16.
  • 17. 2. Composition and aggregation Composition is a special type of aggregation that denotes a strong ownership between Class A, the whole, and Class B, its part. Illustrate composition with a filled diamond. Use a hollow diamond to represent a simple aggregation relationship, in which the "whole" class plays a more important role than the "part" class, but the two classes are not dependent on each other. The diamond ends in both composition and aggregation relationships point toward the "whole" class (i.e., the aggregation).
  • 18.
  • 19. 3. Generalization and specialization Generalization is another name for inheritance or an "is a" relationship. It refers to a relationship between two classes where one class is a specialized version of another. For example, Honda is a type of car. So the class Honda would have a generalization relationship with the class car.
  • 20.
  • 21. Difference between Class diagram and Object diagram Parameters Class Diagram Object Diagram Definition Class diagram captures the static aspect of system to be designed. Object diagram shows behavioral relationship of classes. Dynamic change It does not include dynamic or runtime change in the system It captures dynamic or runtime changes in the state of system. Data Class diagram includes variables and operations Object diagram the values of variables and which operation performed Purpose It shows what objects in the system It shows how those objects behave at run time
  • 22. Analysis - Object & classes finding analysis • The UP (Unified Process) activity: Analyze a use case The outputs from the UP workflow “Analyze a use case” are analysis classes and use case realizations as shown in the following figure Figure. The origin of Analysis class
  • 23. • What are analysis classes? Analysis classes are classes that: - represent a abstraction in the problem domain; - should map on to real-world business concepts (and be carefully named accordingly). The problem domain is the domain in which the need for a software system first arises. This is usually a specific area of the business such as online selling or customer relationship management. However, it is important to note that the problem domain might not be any specific business activity at all, but might arise from a piece of physical hardware that needs software to operate it – this is an embedded system. Ultimately, all commercial software development serves some business need, be that automating an existing business process, or developing a new product that has a significant software component. The most important aspect of an analysis class is that it should map in a clear and unambiguous way on to some real-world business concept such as customer, product, or account. However, this statement
  • 24. assumes that the business concepts themselves are clear and unambiguous and this is rarely the case. It is therefore the job of the OO analyst to try to clarify confused or inappropriate business concepts into something that can form the basis of an analysis class. So the first step in building OO software is to clarify the problem domain. It is important that all classes in the analysis model are analysis classes rather than classes arising from design considerations (the solution domain). When you get down to detailed design you may find that analysis classes are ultimately refined into one or more design classes. The real goal of OO analysis is finding the classes of those objects. In fact, finding the right analysis classes is the key to OO analysis and design. If the classes are not right in analysis, then the rest of the software engineering process, which is predicated on the requirements and analysis workflows, will be in jeopardy. It is therefore crucial to spend sufficient time in the analysis workflow to ensure that the right set of analysis classes has been identified. This time will be well spent, as it will almost certainly save time later.
  • 25. • Anatomy of an analysis class Analysis classes should present a very “high level” set of attributes. Analysis class operations specify, at a high level, the key services that the class must offer. In design they will become actual, implementable methods. However, one high-level operation will often break down into more than one method. We have already covered the UML syntax for classes in detail, but in analysis only a small subset of that syntax is actually used. Of course, the analyst is always free to add any opinions felt to be necessary to make the model clearer. However, the basic syntax of an analysis class always avoids implementation details. After all, in analysis we are trying to capture the big picture. A minimal form for an analysis class consists of the following. • Name – this is mandatory. • Attributes – attribute names are mandatory although only an important subset of candidate attributes may be modeled at this point. Attribute types are considered optional.
  • 26. • Operations – in analysis, operations might just be very high-level statements of the responsibilities of the class. Operation parameters and return types are only shown where they are important for understanding the model. • Visibility – generally not shown. • Labels (Stereotypes) – may be shown if they enhance the model. • Marked (Tagged) values – may be shown if they enhance the model. An example is given in Figure
  • 27. • Finding classes Finding analysis classes is on of the important activity in unified process. There are two ways 1. Finding classes with the help of noun/verb analysis 2. Finding class with the help of CRC analysis 1. Finding classes using noun/verb analysis Noun/verb analysis is a very simple way of analyzing text to try to find classes, attributes, and responsibilities. In essence, nouns and noun phrases in the text indicate classes or attributes of classes, and verbs and verb phrases indicate responsibilities or operations of a class. We have to be very careful if the problem domain is poorly understood and defined. In this case, try to collect as much information about the domain from as many people as possible. Look for similar problem domains outside your organization.
  • 28. Perhaps the trickiest aspect of noun/verb analysis is finding the “hidden” classes. These are classes which are intrinsic to the problem domain, but which might never be mentioned explicitly. For example, in a reservation system for a holiday company, you will hear the stakeholders talk about reservations, bookings, etc., but the single most important abstraction, Order, may never be mentioned explicitly if it does not exist in current business systems. Noun/verb analysis procedure The first step in noun/verb analysis is to collect as much relevant information as possible. Suitable sources of information are: • the Supplementary Requirements Specification (if it exists); • use cases; • the project Glossary; • anything else (architecture, vision documents, etc.). After collecting the documentation, analyze it in a very simple way by highlighting (or recording in some other way) the following:
  • 29. • nouns – e.g. flight; • noun phrases – e.g. flight number; • verbs – e.g. allocate; • verb phrases – e.g. verify credit card. Nouns and noun phrases may indicate classes or class attributes. Verbs and verb phrases may indicate responsibilities of classes. If you come across any terms that you don’t understand during this process, seek immediate clarification from a domain expert and add the term to the Project Glossary. Take the list of nouns, noun phrases, verbs, and verb phrases and use the Project Glossary to resolve any synonyms and homonyms. This creates a list of candidate classes, attributes, and responsibilities. Once you have this list of candidate classes, attributes, and responsibilities, you make a tentative allocation of the attributes and responsibilities to the classes.
  • 30. 2. Finding classes using CRC (Class Responsibility Collaborator) analysis A very good (and fun) way to get user involvement in finding classes is to use CRC analysis – this stands for class, responsibilities, and collaborators. This technique uses the world’s most powerful analysis tool, the sticky note! So popular is the CRC method that there is a (possibly apocryphal) story that at one point a company actually marketed sticky notes already marked out with class name, responsibilities, and collaborators. You begin by marking up some sticky notes as shown Figure
  • 31. The note is divided into three compartments – in the top compartment you record the name of the candidate class; in the left compartment, the responsibilities; and in the right the collaborators. Collaborators are other classes that may collaborate with this class to realize a piece of system functionality. The collaborators compartment provides a way of recording relationships between classes. Another way to capture relationships (which we prefer) is to stick the notes on a whiteboard, and draw lines between the collaborating classes. CRC analysis procedure The CRC analysis procedure is straightforward and the key is to separate information gathering from information analysis. CRC is therefore best run as a two-phase activity. Phase 1: Brainstorm – gather the information The participants are OO analysts, stakeholders, and domain experts. The procedure is as follows.
  • 32. 1 Explain that this is a true brainstorm. 1.1 All ideas are accepted as good ideas. 1.2 Ideas are recorded but not debated – never argue about something, just write it down and then move on. Everything will be analyzed later. 2 Ask the team members to name the “things” that operate in their business domain – e.g. customer, product. 2.1 Write each thing on a sticky note – it is a candidate class, or attribute of a class. 2.2 Stick the note on a wall or whiteboard. 3 Ask the team to state responsibilities that those things might have – record these in the responsibilities compartment of the note. 4 Working with the team, try to identify classes that might work together. Rearrange the notes on the whiteboard to reflect this organization and draw lines between them. Alternatively, record collaborators in the collaborators compartment of the note.
  • 33. Phase 2: Analyze information The participants are OO analysis, and domain experts. How do you decide which sticky notes should become classes and which should become attributes? analysis classes must represent a crisp abstraction in the problem domain. Certain sticky notes will represent key business concepts and clearly need to become classes. Other notes may become classes or attributes. If a note logically seems to be a part of another note, this is a good indication that it represents an attribute. Also, if a note doesn’t seem to be particularly important, or has very little interesting behavior, see if it can be made an attribute of another class. If in doubt about a note just make it a class. The important point is to make a best guess and then drive this process to closure – you can always refine the model later.
  • 34. Refining analysis relationships When you move to design, you have to refine the relationships between analysis classes into relationships between design classes. Many of the relationships captured in analysis are not directly implementable as they stand, and they must be made so. For example, there is no commonly used OO programming language that directly supports bidirectional associations, association classes, or many-to-many associations. To create a design model, you have to specify how these associations are going to be realized. Refining analysis associations to design associations involves several procedures: • refining associations to aggregation or composition relationships • implementing association classes • implementing one-to-many associations • implementing many-to-many associations • implementing bidirectional associations. All design associations must have: • navigability • multiplicity on both ends All design associations should have a role name on at least the target end.
  • 35. Inheritance and Polymorphism Before we can discuss inheritance and polymorphism, we need to have a solid understanding of the idea of generalization. Generalization is a relationship between a more general element and a more specific element, where the more specific element is entirely consistent with the more general element, but contains more information. Conceptually, generalization is a very simple idea – you are already very familiar with the notion of general things such as a tree, and then more specific things such as an oak tree, which is a particular type of tree. You have already seen generalization applied to use cases and actors, and now you will see how it is applied to classes. In fact, generalization applies to all classifiers and to some other modeling elements such as associations, states, events, and collaborations.
  • 36. • Class inheritance When you arrange classes into a generalization hierarchy as shown previous Figure you implicitly have inheritance between the classes where the subclasses inherit all the features of their super classes. To be more specific, subclasses inherit: - Attributes - operations - Relationships - constraints Subclasses can also add new features and override superclass operations. Overriding In the example as shown in Figure the Shape subclasses Square and Circle inherit all of the attributes, operations, and constraints from the Shape superclass. This means that although you don’t see these features in the subclasses, they are actually implicitly there. We say that Square and Circle are a type of Shape.
  • 37. Notice that the operations draw( ) and getArea( ) defined in Shape can in no way be appropriate for the subclasses. Square and Circle need to implement their own draw( ) and getArea( ) operations that override the default operations supplied by the parent and provide a more appropriate behavior as shown in figure. the subclasses Square and Circle have provided their own draw( ) and getArea( ) operations that have the appropriate behaviors
  • 38. To override a superclass operation, a subclass must provide an operation with exactly the same signature as the superclass operation it wishes to override. UML defines operation signature as the operation name, its return type, and the types of all of the parameters listed in order. The parameter names don’t count, as they are just a convenient way of referring to a specific parameter within an operation body, and so are not really part of the signature. Abstract operations and classes We can specify that an operation lacks an implementation by making it an abstract operation. In UML you do this simply by writing the operation name in italics. When you think about it, a class with one or more abstract operations is incomplete as there are some operations that don’t have an implementation. This means that you can’t instantiate such classes and they are therefore known as abstract classes. You write the class name in italics to show that it is abstract. In the example as shown in the figure below, we have the abstract
  • 39. class shape which has two abstract operations Shape::draw( g : Graphics ) and Shape::getArea( ) : int. The implementations for these operations are provided by both the Square and the Circle subclasses. Although Shape is incomplete, and can’t be instantiated, both of its subclasses provide the missing implementations, are complete and can be instantiated. Any class that can be instantiated is known as a concrete class. The operation getBoundingArea( ) is a concrete operation of Shape because the bounding area of every kind of Shape is calculated in the exactly the same way – it is always the width of the shape multiplied by its height. There are a couple of big advantages of using abstract classes and operations.
  • 40. • We can define a set of abstract operations in the abstract superclass that must be implemented by all Shape subclasses. You can think of this as defining a “contract” that all concrete Shape subclasses must implement. • We can write code to manipulate Shapes and then substitute Circle, Square and other Shape subclasses as appropriate. According to the substitutability principle, code written to manipulate Shapes should also work for all Shape subclasses. Level of abstraction Before we get into polymorphism, it’s a good idea to understand something about levels of abstraction. What’s wrong with the model in Figure
  • 41. The answer is “levels of abstraction”. A generalization hierarchy defines a set of levels of abstraction from the most general at the top to the most specific at the bottom. You should always try to maintain a uniform level of abstraction at each level of the generalization hierarchy. In the example above, we have not achieved this. JaguarXJS is a type of car. Clearly this is a lower level of abstraction than Truck. Polymorphism Polymorphism means “many forms”. A polymorphic operation is one that has many implementations. You have already seen two polymorphic operations in the Shape example. The abstract operations draw( ) and getArea( ) in the Shape class have two different implementations – an implementation in the Square class and a different implementation in the Circle class. The operations have “many forms” and are therefore polymorphic. Following figure illustrates polymorphism perfectly. We define an abstract Shape class with abstract operations draw( ) and getArea( ).
  • 42. Clearly the implementation of draw( ) and getArea( ) will be different for Squares and Circles. The draw( ) operation will draw a square for objects of the Square class, and will draw a circle for objects of the Circle class. You can see that the getArea( ) operation will also have different implementations. It will return width*height for a square and π*r2 for a circle. This is the essence of polymorphism – objects of different classes have operations with the same signature but different implementations. Encapsulation, inheritance, and polymorphism are the “three pillars” of OO. Polymorphism allows you to design simpler systems that can more easily accommodate change because it allows you to treat different objects in the same way.
  • 43. Object Diagram An object diagram is a diagram that shows objects and their relationships at a point in time. It is like a snapshot of part of an executing OO system at a particular instant, showing the objects and the links between them. A link is a semantic connection between two objects that allows messages to be sent from one object to the other. Many links that join those objects together. Messages are passed back and forth between objects over these links. On receipt of a message, an object will invoke the corresponding method. Objects that are connected by links may adopt various roles relative to each other. As shown in the following figure, you can see that the jim object adopts the role of chairman in its link with the downHillSkiClub object. You indicate this on the object diagram by placing the role name at the appropriate end of the link. You can put role names at either or both ends of a link. In this case, the downHillSkiClub object always plays the role of “club” and so there is
  • 44. no real point in showing this on the diagram – it would not really add anything to our understanding of the object relationships. Figure tells us that at a particular point in time, the object jim is playing the role of chairman. However, it is important to realize that links are dynamic connections between objects. the chairman role may pass at some point to fab or christian, and we could easily create an object diagram to show this new state of affairs. Normally, a single link connects exactly two objects as shown in Figure. However, UML does allow a single link to connect more than two objects. This is known as an n-ary link and is shown as a diamond with a path to each participating object.
  • 45. We can specify that the link only goes one way by placing an arrowhead on the appropriate end of the line. For example, Figure shows that the link between :PersonDetails and :Address is unidirectional. This means that the :PersonDetails object has an object reference to the :Address object, but not vice versa. Messages can only be sent from :PersonDetails to :Address. Paths UML symbols, such as the object icon, use case icon, and class icon, are connected to other symbols by paths. A path is a “connected series of graphic segments” joining two or more symbols. There are two styles for drawing paths: • orthogonal – where the path consists of a series of horizontal and vertical segments • oblique – where the path is a series of one or more sloping lines (shown in below figure)
  • 46. In above Figure, we have adopted the orthogonal path style, and the paths have been combined into a tree. You can only combine paths that have the same properties. In this case, all the paths represent links and so we can legally combine them.
  • 47. Component diagram- Interfaces & components • Component based software architecture Component-based architecture focuses on the decomposition of the design into individual functional or logical components that represent well-defined communication interfaces containing methods, events, and properties. It provides a higher level of abstraction and divides the problem into sub-problems, each associated with component partitions. The primary objective of component-based architecture is to ensure component reusability. A component encapsulates functionality and behaviors of a software element into a reusable and self-deployable binary unit. Component-oriented software design has many advantages over the traditional object-oriented approaches such as − - Reduced time in market and the development cost by reusing existing components. - Increased reliability with the reuse of the existing components.
  • 48. • What is a Component? A component is a modular, portable, replaceable, and reusable set of well-defined functionality that encapsulates its implementation and exporting it as a higher-level interface. A component is a software object, intended to interact with other components, encapsulating certain functionality or a set of functionalities. It has an obviously defined interface and conforms to a recommended behavior common to all components within an architecture. • Views of a Component A component can have three different views 1. object-oriented view 2. conventional view 3. process-related view
  • 49. 1. Object-oriented view A component is viewed as a set of one or more cooperating classes. Each problem domain class (analysis) and infrastructure class (design) are explained to identify all attributes and operations that apply to its implementation. It also involves defining the interfaces that enable classes to communicate and cooperate. 2. Conventional view It is viewed as a functional element or a module of a program that integrates the processing logic, the internal data structures that are required to implement the processing logic and an interface that enables the component to be invoked and data to be passed to it. 3. Process-related view In this view, instead of creating each component from scratch, the system is building from existing components maintained in a library. As the software architecture is formulated, components are selected from the library and used to populate the architecture.
  • 50. A component diagram, also known as a UML component diagram, describes the organization and wiring of the physical components in a system. Component diagrams are often drawn to help model implementation details and double-check that every aspect of the system's required functions is covered by planned development. • Basic Component Diagram Symbols & Notations Component A component is a logical unit block of the system, a slightly higher abstraction than classes. It is represented as a rectangle with a smaller rectangle in the upper right corner with tabs or the word written above the name of the component to help distinguish it from a class.
  • 51. Interface An interface (small circle or semi-circle on a stick) describes a group of operations used (required) or created (provided) by components. A full circle represents an interface created or provided by the component. A semi-circle represents a required interface, like a person's input. Dependencies Draw dependencies among components using dashed arrows.
  • 52. Port Ports are represented using a square along the edge of the system or a component. A port is often used to help expose required and provided interfaces of a component. How to Draw a Component Diagram • Take stock of everything needed to implement the planned system. • Create a visual for each of the components. • Describe the organization and relationships between components using interfaces, ports, and dependencies.
  • 53.
  • 54.
  • 55. Deployment Diagrams A deployment diagram shows the physical configuration of the system in terms of physical nodes and physical connections between the nodes, such as network connections. A node is shown as a cube, and the connection is shown as a line joining the nodes. A deployment diagram is essentially a class diagram that focuses on the system’s nodes. The term Deployment itself describes the purpose of the diagram. Deployment diagrams are used for describing the hardware components, where software components are deployed. Component diagrams and deployment diagrams are closely related. Component diagrams are used to describe the components and deployment diagrams shows how they are deployed in hardware. Most of the UML diagrams are used to handle logical components but deployment diagrams are made to focus on the hardware topology of a system. Deployment diagrams are used by the system engineers. The purpose of deployment diagrams can be described as − • Visualize the hardware topology of a system. • Describe the hardware components used to deploy software components. • Describe the runtime processing nodes.
  • 56. How to Draw a Deployment Diagram? Node There are two types of nodes in a deployment diagram. The first are device nodes--computing resources that have processing capabilities and the ability to execute programs. Some examples of device nodes are a PC, laptop, or mobile phone. The second type of node is called an execution environment node, or EEN. An EEN is any computer system that resides within a device node. It could be an operating system, a JVM, or another servlet container.
  • 57. Database Represents any data stored by the deployed system. In the example, the database is represented as just another node, but sometimes you will see this shape as a database. Other Shapes Communication path A straight line that represents communication between two device nodes. Artifacts A box with the header "<<artifact>>" and then the name of the file. Package A package is a file shaped box that groups together all the device nodes to encapsulate the entire deployment. Component UML Component diagram notations are going to be the same here as in the component diagram section.
  • 58. Hierarchical Node Hierarchical nodes can be modeled using composition or by defining an internal structure. Internal structure of the node is defined in terms of parts & connectors. Parts of the node could be only nodes. Execution environment is usually a part of a general node or <<device>> which represents the physical hardware environment on which this execution environment resides. Execution environments can be nested (e.g., a database execution environment may be nested in an operating system execution environment).
  • 59. Device A device is a node which represents a physical computational resource with processing capability upon which artifacts may be deployed for execution. A device is rendered as a node (perspective, 3-dimensional view of a cube) annotated with keyword «device». UML provides no standard stereotypes for devices. Examples of non- normative stereotypes for devices are: «application server» «client workstation» «mobile device» «embedded device» Device may be depicted using custom icon. Profiles, stereotypes and tagged values could be used to provide custom icons and properties for the devices.
  • 60.
  • 61. Deployment diagrams can be used − • To model the hardware topology of a system. • To model the embedded system. • To model the hardware details for a client/server system. • To model the hardware details of a distributed application. • For Forward and Reverse engineering. Figure. application deployment to Android.
  • 62. Package Diagram Packages in software are used to group logically similar kind of elements. Packages are used to group similar classes. We have studied Use case packages are used for grouping logically similar kind of use cases at one place to handle the complexity.
  • 63. Package diagram is UML structure diagram which shows packages and dependencies between the packages. Package • Package is a namespace used to group together elements that are semantically related and might change together. It is a general purpose mechanism to organize elements into groups to provide better structure for system model. • Owned members of a package should all be package able elements. If a package is removed from a model, so are all the elements owned by the package. Package by itself is package able element, so any package could be also a member of other packages. • As a namespace, a package can import either individual members of other packages or all the members of other packages. Package can also be merged with other packages. • A package is rendered as a tabbed folder as shown in the following figure - a rectangle with a small tab attached to the left side of the top of the rectangle. If the members of the package are not shown inside the package rectangle, then the name of the package should be placed inside.
  • 64. The members of the package may be shown within the boundaries of the package. In this case the name of the package should be placed on the tab. A diagram showing a package with content is allowed to show only a subset of the contained elements according to some criterion. Members of the package may be shown outside of the package by branching lines from the package to the members. A plus sign (+) within a circle is drawn at the end attached to the namespace (package). This notation for packages is semantically equivalent to composition (which is shown using solid diamond.)
  • 65. The elements that can be referred to within a package using non- qualified names are: • owned elements, • imported elements, and • elements in enclosing (outer) namespaces. Owned and imported elements may have a visibility that determines whether they are available outside the package. If an element that is owned by a package has visibility, it could be only public or private visibility. Protected or package visibility is not allowed. The visibility of a package element may be indicated by preceding the name of the element by a visibility symbol ("+" for public and "-" for private).
  • 66. • Package URI Attribute Package has optional URI attribute which serves as unique identifier of the package. This attribute was introduced in UML 2.4 mostly to support exchange of profiles using XMI. The URI attribute of a package may be rendered in the form {uri=<uri>} after the package name. • Package Template Package can be used as a template for other packages. Package element can be used as a template parameter. A package template parameter may refer to any element owned or used by the package template, or templates nested within it.
  • 67. A package may be bound to one or more template packages. When several bindings are applied the result of bindings is produced by taking the intermediate results and merging them into the combined result using package merge.
  • 68. • Package able Element Package able element is a named element that may be owned directly by a package. Some examples of package able elements are: - Type - Classifier - Class - Use case - Component etc. Package able element by itself has no notation (Element import). Element import is directed relationship between an importing namespace and imported package able element. It allows the element to be referenced using its name without a qualifier. An element import is used to selectively import individual elements without relying on a package import. The name of the package able element or its alias is to be added to the namespace of the importing namespace. It works by reference, which means that it is not possible to add features to the element import itself, but it is possible to modify the referenced element in the namespace from which it was imported.
  • 69. It is possible to control whether the imported element can be further imported by other namespaces using either element or package imports. The visibility of the element import may be either the same or more restricted than that of the imported element. The visibility of an element import is either public or private. An element import is shown using a dashed arrow with an open arrowhead from the importing namespace to the imported element. Note, that though it looks exactly like dependency and usage relationships, it is a completely separate directed relationship. The keyword «import» is shown near the dashed arrow if the visibility of import is public while the keyword «access» is used to indicate private visibility. If the imported element is not a package, the keyword may optionally be preceded by element, i.e., «element import».
  • 70. Figure. package diagram elements - package, import, access, use, merge
  • 71. Various examples of Class diagram Figure. class diagram example for the Abstract Factory Design Pattern
  • 72. Class Diagram for Hotel Management System
  • 73. Class Diagram for ATM machine
  • 74.
  • 75.
  • 76. Various examples of Component diagram Figure. Online shopping UML component diagram example with three related subsystems – Web Store, Warehouses, and Accounting
  • 77. Figure. component diagram for a product using Sentinel HASP Software Licensing Security Solution
  • 78. Various examples of Deployment diagram
  • 79. Figure. networking diagram for web application
  • 80. Figure. home networking diagram - cable modem, wireless router, various computers and devices
  • 81. Figure. deployment diagram for Apple iTunes
  • 82. Figure. deployment diagram with hardware load balancing of J2EE servers
  • 83. Various examples of Package diagram Figure. package diagram representi ng major interfaces and classes of Java™ Servlet 2.5 API
  • 84. Figure. package diagram elements - package, import, access, use, merge
  • 85. Figure. package template example for the Data Transfer Object design pattern
  • 86. Figure. package diagram of multi layered web application
  翻译: