Unit-3
Unit-3
Unit-3
Hours)
Design process: Design concepts, Design Model,
Design Heuristic Architectural Design:
Architectural Mapping using Data Flow Structure
Chart design using DFD. Transform Analysis,
Transaction Analysis: OOD Modeling Using UML,
User Interface Design.
CASE TOOL: Application on Design
Software Design
Software design is a mechanism to transform user requirements
into some suitable form, which helps the programmer in software
coding and implementation.
It deals with representing the client's requirement, as described in
SRS (Software Requirement Specification) document, into a form,
i.e., easily implementable using programming language.
The software design phase is the first step in SDLC (Software Design
Life Cycle), which moves the concentration from the problem domain
to the solution domain.
In software design, we consider the system to be a set of components or
modules with clearly defined behaviors & boundaries.
The objective of design phase is to take the SRS document as input and
produce the above mentioned document before completion of design
phase.
It is a single step procedure but requires several iterations.
Pre-requisites for software design
Different modules required to implement the design
solution.
Control relationship among the identified modules[ it is
also called as call relationship or invocation relationship
among modules].
Interface among different modules:- identifies exact data
items exchanged among the modules.
Data structures of individual modules.
Algorithms required to implement the individual modules
Design Activities
Preliminary (or high-level) design:-
Identification of different modules,
The control relationship
Definitions of interfaces among them
Outcome:- program structure/ software architecture
Note:- structure chart (tree-like diagram ) / Jackson diagram /
Warnier-orr diagram to represent the control hierarchy in
high- level design.
Detailed design:-
Data structure
algorithms of different modules
Outcome:- Module specification document
Objectives of Software Design
Correctness: Software design
should be correct as per
requirement.
Completeness: The design
should have all components like
data structures, modules, and
external interfaces, etc.
Efficiency: Resources should be
used efficiently by the program.
Flexibility: Able to modify on
changing needs.
Consistency: There should not be
any inconsistency in the design.
Maintainability: The design
should be so simple so that it can
be easily maintainable by other
designers.
Software Design Principles
Software design principles are concerned with providing means to handle
the complexity of the design process effectively.
Effectively managing the complexity will not only reduce the effort
needed for design but can also reduce the scope of introducing errors
during design.
Problem Partitioning
For software design, the goal is to divide the problem into manageable
pieces.
These pieces cannot be entirely independent of each other as they together
form the system.
They have to cooperate and communicate to solve the problem. This
communication adds complexity.
Note: As the number of partition increases = Cost of partition and
complexity increases
Benefits of Problem Partitioning
Software is easy to understand
Software becomes simple
Software is easy to test
Software is easy to modify
Software is easy to maintain
Software is easy to expand
Abstraction
An abstraction is a tool that enables a designer to consider a component at an
abstract level without bothering about the internal details of the
implementation. Abstraction can be used for existing element as well as the
component being designed.
Here, there are two common abstraction mechanisms
Functional Abstraction
Data Abstraction
Functional Abstraction
A module is specified by the method it performs.
The details of the algorithm to accomplish the functions are not visible to the
user of the function.
Functional abstraction forms the basis for Function oriented design
approaches.
Data Abstraction
Details of the data elements are not visible to the users of data. Data
Abstraction forms the basis for Object Oriented design approaches.
Modularity
Single large programs are difficult Advantages of Modularity
to understand and read due to a There are several advantages of
large number of reference variables, Modularity
control paths, global variables, etc. It allows large programs to be written by
several or different people
The desirable properties of a It encourages the creation of commonly
modular system are: used routines to be placed in the library
Each module is a well-defined and used by other programs.
system that can be used with other It simplifies the overlay procedure of
applications. loading a large program into main
Each module has single specified storage.
It provides more checkpoints to measure
objectives.
progress.
Modules can be separately It provides a framework for complete
compiled and saved in the library. testing, more accessible to test
Modules should be easier to use It produced the well designed and more
than to build. readable program.
Disadvantages of Modularity
Modular Design
All names should be unique. This makes it easier to refer to elements in the
DFD.
Remember that DFD is not a flow chart.
Arrows is a flow chart that represents the order of events where as
arrows in DFD represents flowing data.
A DFD does not involve any order of events.
Suppress logical decisions. If we ever have the urge to draw a diamond-shaped
box in a DFD, suppress that urge! A diamond-shaped box is used in flow charts
to represents decision points with multiple exists paths of which the only one is
taken. This implies an ordering of events, which makes no sense in a DFD.
Do not become bogged down with details. Defer error conditions and error
handling until the end of the analysis.
Standard symbols for DFD
Standard
symbols for
DFDs are
derived from
the electric
circuit
diagram
analysis and
are shown in
fig:.
Levels in Data Flow Diagrams (DFD)
In Software engineering DFD(data flow diagram) can
be drawn to represent the system of different levels of
abstraction.
Infact, DFDs may be partitioned into levels that represent
increasing information flow and functional detail.
The DFD may be used to perform a system or software at
any level of abstraction.
Higher level DFDs are partitioned into low levels-hacking
more information and functional elements.
Levels in DFD are numbered 0, 1, 2 or beyond. Here, we
will see primarily three levels in the data flow diagram,
which are: 0-level DFD, 1-level DFD, and 2-level DFD.
0-level DFD
It is also known as fundamental system model, or context
diagram represents the entire software requirement as a
single bubble with input and output data denoted by
incoming and outgoing arrows.
Then the system is decomposed and described as a DFD
with multiple bubbles.
Parts of the system represented by each of these bubbles are
then decomposed and documented as more and more
detailed DFDs.
This process may be repeated at as many levels as necessary
until the program at hand is well understood.
It is essential to preserve the number of inputs and outputs
between levels, this concept is called leveling by DeMacro.
0-level DFD cont……
Thus, if bubble "A" has two inputs x1 and x2 and one output y,
then the expanded DFD, that represents "A" should have exactly
two external inputs and one external output as shown in fig:
Condition - It is represented by
small diamond at the base of
module. It depicts that control
module can select any of sub-
routine based on some
condition.
Symbols used in structure charts cont..
Jump - An arrow is shown
pointing inside the module to
depict that the control will
jump in the middle of the sub-
module.
DFD
Structure
chart
Transaction Analysis
A transaction allows the user to perform some meaningful piece of
work.
Transaction analysis is useful while designing transaction
processing programs.
In a transaction-driven system, one of several possible paths
through the DFD is traversed depending upon the input data item.
This is in contrast to a transform centered system which is
characterized by similar processing steps for each data item.
Each different way in which input data is handled is a transaction.
A simple way to identify a transaction is to check the input data.
The number of bubbles on which the input data to the DFD are
incident defines the number of transactions.
However, some transaction may not require any input data. These
transactions can be identified from the experience of solving a
large number of examples.
Transaction Analysis cont…..
For each identified transaction, trace the input data to the
output.
All the traversed bubbles belong to the transaction.
These bubbles should be mapped to the same module on the
structure chart.
Module and below this module draw each identified transaction
a module. Every transaction carries a tag, which identifies its
type. Transaction analysis uses this tag to divide the system into
transaction modules and a transaction-center module.
module and below this module draw each identified transaction
a module. Every transaction carries a tag, which identifies its
type. Transaction analysis uses this tag to divide the system into
transaction modules and a transaction-center module.
The structure chart for the supermarket prize scheme software is shown
OOD Modeling Using UML
The Unified Modeling Language (UML) is a general-purpose, developmental,
modeling language in the field of software engineering that is intended to
provide a standard way to visualize the design of a system.
The goal of UML is to provide a standard notation that can be used by all
object-oriented methods and to select and integrate the best elements of
precursor notations.
Mainly, UML has been used as a general-purpose modeling language in the field
of software engineering.
However, it has now found its way into the documentation of several business
processes or workflows.
For example, activity diagrams, a type of UML diagram, can be used as a
replacement for flowcharts.
UML is composed of three main building blocks, i.e., things, relationships,
and diagrams.
Which software is used for UML diagrams?
Microsoft Visio:- As one of the MS Office suite applications, Microsoft
Visio is the industry standard diagramming software with which users
can set up a wide range of diagrams, which include UML classes.
UML cont…..
UML is different from the other common programming languages
such as C++, Java, COBOL, etc.
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.
UML is not a programming language but tools can be used to
generate code in various languages using UML diagrams.
UML has a direct relation with object oriented analysis and design.
After some standardization, UML has become an OMG(Object
Management Group) standard.
Conceptual Model of UML
A conceptual model can be defined as a model which is
made of concepts and their relationships. A conceptual
model is the first step before drawing a UML diagram. It
helps to understand the entities in the real world and
how they interact with each other. The conceptual
model of UML can be mastered by learning the
following three major elements −
UML building blocks
Rules to connect the building blocks
Common mechanisms of UML
Conceptual Model of UML
Characteristics of UML
It is a generalized modeling language.
It is different from software programming languages such as
Python, C, C++, etc.
It is a pictorial language which can be used to generate powerful
modeling elements.
It is related to object-oriented designs and analysis.
Class diagram
Object diagram
Component diagram
Deployment diagram
Behavioral Diagrams
Generalization
Aggregation
Association
Dependencies
Constraints
Points for drawing a class diagram
The name of the class diagram should be meaningful to describe the
aspect of the system.
Each element and their relationships should be identified in advance.
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.
The following diagram is an example of an
Order System of an application.
It describes a particular aspect of the entire
application.
First of all, Order and Customer are identified
as the two elements of the system. They have a
one-to-many relationship because a customer
can have multiple orders.
Order class is an abstract class and it has two
concrete classes (inheritance relationship)
SpecialOrder and NormalOrder.
The two inherited classes have all the
properties as the Order class. In addition, they
have additional functions like dispatch () and
receive ().
The following class diagram has been drawn
considering all the points mentioned above.
Object Diagram
Object diagrams can be described as an instance of class diagram.
Thus, these diagrams are more close to real-life scenarios where we
implement a system.
Object diagrams are a set of objects and their relationship is just like
class diagrams. They also represent the static view of the system.
The usage of object diagrams is similar to class diagrams but they are
used to build prototype of a system from a practical perspective.
The purpose of the object diagram can be summarized as-
Forward and reverse engineering.
Object relationships of a system
Static view of an interaction.
Understand object behaviour and their relationship from practical
perspective
Note:-A single object diagram cannot capture all the necessary instances or rather
cannot specify all the objects of a system.
Solution:-
First, analyze the system and decide which instances have important data and
association.
Second, consider only those instances, which will cover the functionality.
Third, make some optimization as the number of instances are unlimited.
Before drawing an object diagram, the following things should be remembered and
understood clearly −
Object diagrams consist of objects.
The link in object diagram is used to connect objects.
Objects and links are the two elements used to construct an object diagram.
After this, the following things are to be decided before starting the construction of
the diagram −
The object diagram should have a meaningful name to indicate its purpose.
The most important elements are to be identified.
The association among objects should be clarified.
Values of different elements need to be captured to include in the object diagram.
Add proper notes at points where more clarity is required.
Where to Use Object Diagrams?
The deployment
diagram consist of the
following notations:
A component
An artifact
An interface
A node
How to draw a Deployment Diagram?
since it plays a critical role during the administrative
process, it involves the following parameters:
High performance
Scalability
Maintainability
Portability
Easily understandable
NOTE:-One of the essential elements of the deployment
diagram is the nodes and artifacts.
A deployment diagram for the Apple iTunes
application is given below.
1. The iTunes setup can be downloaded
from the iTunes website, and also it
can be installed on the home
computer.
2. Once the installation and the
registration are done, iTunes
application can easily interconnect
with the Apple iTunes store.
3. Users can purchase and download
music, video, TV serials, etc. and cache
it in the media library.
4. Devices like Apple iPod Touch and
Apple iPhone can update its own media
library from the computer with iTunes
with the help of USB or simply by
downloading media directly from the
Apple iTunes store using wireless
protocols, for example; Wi-Fi, 3G, or
EDGE.1.
When to use a Deployment Diagram?
Deployment diagrams can be used for the followings:
To model the network and hardware topology of a
system.
To model the distributed networks and systems.
Implement forwarding and reverse engineering
processes.
To model the hardware details for a client/server
system.
For modeling the embedded system.
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 diagram
Sequence diagram
Collaboration diagram
State chart diagram
Activity diagram
Use case diagram
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.
Purpose of Use Case Diagrams
Multiple objects residing in the system can make a complex collaboration diagram, as it becomes quite
hard to explore the objects.
It is a time-consuming diagram.
After the program terminates, the object is destroyed.
As the object state changes momentarily, it becomes difficult to keep an eye on every single that has
occurred inside the object of a system.
State chart Diagram