Se 3
Se 3
Se 3
UML
UML is a pictorial language used to make software blueprints. UML can be
described as a general purpose visual modeling language to visualize,
specify, construct, and document software system.Although UML is
generally used to model software systems, it is not limited within this
boundary. It is also used to model non-software systems as well. For
example, the process flow in a manufacturing unit, etc.
There are two broad categories of diagrams and they are again divided into
subcategories −
• Structural Diagrams
• Behavioral Diagrams
Structural Diagrams
The structural diagrams represent the static aspect of the system. These static
aspects represent those parts of a diagram, which forms the main structure and are
therefore stable.
These static parts are represented by classes, interfaces, objects, components, and
nodes. The four structural diagrams are −
• Class diagram
• Object diagram
• Component diagram
• Deployment diagram
Class Diagram
Class diagrams are the most common diagrams used in UML. Class diagram
consists of classes, interfaces, associations, and collaboration. Class diagrams
basically represent the object-oriented view of a system, which is static in nature.
Active class is used in a class diagram to represent the concurrency of the system.
Class diagram represents the object orientation of a system. Hence, it is generally
used for development purpose. This is the most widely used diagram at the time of
system construction.
Class diagram describes the attributes and operations of a
class and also the constraints imposed on the system. The
class diagrams are widely used in the modeling of
objectoriented systems.
Purpose of class diagram
• Analysis and design of the static view of an application.
• Describe responsibilities of a system.
• Base for component and deployment diagrams.
Object Diagram
Component Diagram
Deployment diagrams are a set of nodes and their relationships. These nodes are
physical entities where the components are deployed.
Deployment diagrams are used for visualizing the deployment view of a system.
This is generally used by the deployment team.
1. A component
2. An artifact
3. An interface
4. A node
Behavioral Diagrams
Any system can have two aspects, static and dynamic. So, a model is considered
as complete when both the aspects are fully covered.
Behavioral diagrams basically capture the dynamic aspect of a system. Dynamic
aspect can be further described as the changing/moving parts of a system.
UML has the following five types of behavioral diagrams −
Use case diagrams are a set of use cases, actors, and their
relationships. They represent the use case view of a system.A use
case represents a particular functionality of a system. Hence, use
case diagram is used to describe the relationships among the
functionalities and their internal/external controllers. These
controllers are known as actors.UML is a pictorial language used
to make software blueprints.UML can be described as a general
purpose visual modeling language to visualize, specify, construct,
and document software system.Although UML is generally used to
model software systems, it is not limited within this boundary. It is
also used to model non-software systems as well. For example, the
process flow in a manufacturing unit, etc.
From the term Interaction, it is clear that the diagram is used to describe some type
of interactions among the different elements in the model. This interaction is a part
of dynamic behavior of the system.This interactive behavior is represented in UML
by two diagrams known as Sequence diagram and Collaboration diagram. The
basic purpose of both the diagrams are similar. Sequence diagram emphasizes on
time sequence of messages and collaboration diagram emphasizes on the structural
organization of the objects that send and receive messages.
Sequence Diagram
A sequence diagram is an interaction diagram. From the name, it is clear that the
diagram deals with some sequences, which are the sequence of messages flowing
from one object to another.
Interaction among the components of a system is very important from
implementation and execution perspective. Sequence diagram is used to visualize
the sequence of calls in a system to perform a specific functionality.
Collaboration Diagram
Activity Diagram
Package
A package is an organized group of elements. A package may contain structural
things like classes, components, and other packages in it.
Notation − Graphically, a package is represented by a tabbed folder. A package is
generally drawn with only its name. However it may have additional details about
the contents of the package. See the following figures.
Package is the UML mechanism for grouping things. It can be used to:
An element with public visibility are visible to elements outside the package and
they are exported by the package and are represented by pre-pending ‘+’.
An element with private visibility are completely hidden inside the package and
are represented by pre-pending ‘-‘.
Standard package stereotypes
Nested packages
Packages may be nested inside other packages to any depth. Two possible
representations of nested packages are shown in Figure:2. First one is commonly
used.
Package dependencies
«use»– This means that an element in the client uses a public element in the
supplier in some way i.e the client depends on the supplier. If a package
dependency is shown without a stereotype, then «use» should be assumed.
Shown in Figure:3.
«merge»– Public elements of the supplier package are merged with elements of
the client package. used only in meta modeling, not used in OO analysis and
design. Shown in Figure:7.
Transitivity
Transitivity means that if there is a relationship between thing A and thing B and a
relationship between thing B and thing C, then there is an implicit relationship
between thing A and thing C. «access» dependency is not transitive and «import»
dependency is transitive. This is illustrated in Figure: 8.
Figure:8 package-transitivity
Stereotypes
A stereotype extends the vocabulary of the UML, allowing you to create new
kinds of building
blocks that are derived from existing ones but that are specific to your problem.
They are used for classifying or marking the UML building blocks in order to
introduce new building blocks that speak the language of your domain and that
look like primitive, or basic, model elements.
Tagged Values
A tagged value extends the properties of a UML building block, allowing you to
create new information in that element’s specification. They are properties for
specifying keyword-value pairs of model elements, where the keywords are
attributes. They allow you to extend the properties of a UML building block so
that you create new information in the specification of that element. Tagged
Values can be defined for existing model elements, or for individual stereotypes
so that everything with that stereotype has that tagged value. It is important to
mention that a tagged value is not equal to a class attribute. Instead, you can
regard a tagged value as being metadata, since its value applies to the element
itself and not to its instances.
Graphically, a tagged value is rendered as a string enclosed by brackets, which is
placed below the name of another model element. The string consists of a name
(the tag), a separator (the symbol =), and a value (of the tag) as shown in the
Figure below:
You can specify just the value if its meaning is unambiguous, such as when the
value is the name of the enumeration.
Usage of Tagged Values
One of the most common uses of a tagged value is to specify properties that are
relevant to code generation or configuration management. So, for example, you
can make use of a tagged value in order to specify the programming language to
which you map a particular class, or you can use it to denote the author and the
version of a component.
Constraints
A constraint is an extension of the semantics of a UML element, allowing you to
add new rules or to modify existing ones. They allow you to extend the semantics
of a UML building block by adding new rules or modifying existing ones. A
constraint specifies conditions that must be held true for the model to be well-
formed. This notation can also be used to adorn a model element’s basic notation,
in order to visualize parts of an element’s specification that have no graphical
cue. For example, you can use constraint notation to provide some properties of
associations, such as order and changeability
Graphically, a constraint is rendered as a string enclosed by brackets and placed
near the associated element or connected to that element or elements by
dependency relationships. The example below shows, you might want to specify
that, across a given association, communication is encrypted. Similarly, you
might want to specify that among a set of associations, only one is manifest at a
time.
SOFTWARE DESIGN
Software Design is the process to transform the user requirements into some
suitable form, which helps the programmer in software coding and
implementation. During the software design phase, the design document is
produced, based on the customer requirements as documented in the SRS
document. Hence the aim of this phase is to transform the SRS document into the
design document.
The following items are designed and documented during the design phase:
1. Correctness:
A good design should be correct i.e. it should correctly implement all the
functionalities of the system.
2. Efficiency:
A good software design should address the resources, time, and cost
optimization issues.
3. Understandability:
A good design should be easily understandable, for which it should be
modular and all the modules are arranged in layers.
4. Completeness:
The design should have all the components like data structures, modules, and
external interfaces, etc.
5. Maintainability:
A good software design should be easily amenable to change whenever a
change request is made from the customer side.
Software Design Concepts:
Concepts are defined as a principal idea or invention that comes into our mind or
in thought to understand something. The software design concept simply means
the idea or principle behind the design. It describes how you plan to solve the
problem of designing software, the logic, or thinking behind how you will design
software. It allows the software engineer to create the model of the system or
software or product that is to be developed or built. The software design concept
provides a supporting and essential structure or model for developing the right
software. There are many concepts of software design and some of them are
given below:
The following points should be considered while designing Software:
1. Architectural Design:
The architecture of a system can be viewed as the overall structure of the
system & the way in which structure provides conceptual integrity of the
system. The architectural design identifies the software as a system with many
components interacting with each other. At this level, the designers get the
idea of the proposed solution domain.
3. Detailed design:
Once the high-level design is complete, a detailed design is undertaken. In
detailed design, each module is examined carefully to design the data structure
and algorithms. The stage outcome is documented in the form of a module
specification document.
Functional independence
Functional independence makes modules easier to develop and test. Changes made to how
they perform their function are less likely to affect the software as a whole.
Functional independence is one of the goals of using information hiding and modularity.
● Stamp Coupling :In stamp coupling, the complete data structure is passed
from one module to another module. Therefore, it involves tramp data. It
may be necessary due to efficiency factors- this choice made by the
insightful designer, not a lazy programmer.
● Content Coupling: In a content coupling, one module can modify the data
of another module or control flow is passed from one module to the other
module. This is the worst form of coupling and should be avoided.
Types of Cohesion:
● Logical Cohesion: The elements are logically related and not functionally.
Ex- A component reads inputs from tape, disk, and network. All the code
for these functions is in the same component. Operations are related, but
the functions are significantly different.
Object-Oriented Design
1. Data design
● The data design element produced a model of data that represent a high level
of abstraction.
2. Architectural design
● The architecture design elements provides us overall view of the system. ●
requirement model.
The architecture model is derived from following sources:● The
information about the application domain to built the software.
● Requirement model elements like data flow diagram or analysis classes,
3. Interface design
● The interface design elements for software represents the information
architecture.
● The component level design for the software completely describes the
UML diagram.
the personal computer, the CPI server and the Control panel.