Unit Iii
Unit Iii
Unit Iii
It encompasses the set of principles, concepts and practices that lead to the
development of high quality system or product. Design creates a representation or
model of the software. Design model provides details about S/W architecture,
interfaces and components that are necessary to implement the system. Quality is
established during Design. Design should exhibit firmness, Content and design.
Design sits at the kernel of S/W Engineering. Design sets the stage for construction.
DESIGN CONCEPTS:
1. Abstraction
2. Architecture
3. Patterns
4. Modularity
5. Information Hiding
6. Functional Independence
7. Refinement
8. Re-Factoring
9. Design Classes.
1. Abstraction: Abstraction is a fundamental principle in software development
that aims to simplify complex systems or components, making it easier for
developers to understand, use, and manage them. By focusing on the essential
functionality and hiding intricate details, abstraction promotes modularity,
maintainability, and reusability of code.
Levels of abstraction:
Highest level of abstraction: Solution is slated in broad terms using the language
of the problem environment.
4. Modularity:
Divides software into separately named and addressable components,
sometimes called modules. Modules are integrated to satisfy problem
requirements. Consider two problems p1 and p2. If the complexity of p1 is cp1
and of p2 is cp2 then effort to solve p1=ep1 and effort to solve p2=ep2. If
cp1>cp2 then ep1>ep2.
The complexity of two problems when they are combined is often greater than
the sum of the perceived complexity when each is taken separately. Based on
Divide and Conquer strategy. It is easier to solve a complex problem when
broken into sub-modules.
5. Information Hiding:
Information contained within a module is inaccessible to other modules that do
not need such information achieved by defining a set of Independent modules
that communicate with one another only that information necessary to achieve
S/W function provides the greatest benefits when modifications are required
during testing and later. Errors introduced during modification are less likely to
propagate to other location within the S/W.
6. Functional Independence:
It is the direct outgrowth of Modularity of abstraction and information hiding.
It is achieved by developing a module with single minded function and an anti
to excessive interaction with other modules. Easier to develop and have simple
interface. Easier to maintain because secondary effects caused by design or
code modification are limited, error propagation is reduced and reusable
modules are possible. Independence is assessed by two quantitative criteria:
a. Cohesion
b. Coupling
Cohesion: Performs a single task requiring little interaction with other modules.
Coupling: Measure of interconnection among modules. Coupling should be low
and cohesion should be high for good design.
9. Design Classes:
Class represents a different layer of design architecture. Five types of Design Classes
a. User interface class: Defines all abstractions that are necessary for human
computer interaction
b. Business domain class: Refinement of the analysis classes that identity attributes
And Services to implement some of business domain.
c. Process class: Implements lower level business abstractions required to fully
manage the business domain classes
d. Persistent class: Represent data stores that will persist beyond the execution of
the software
e. System class: Implements management and control functions to operate and
Communicate within the computer environment and with the outside world.
Design Model:
A design model is the means to describe a system's implementation and source
code in a diagrammatic fashion. It has two advantages: simpler representation
and it can be quickly understood. Moving from requirements to design
specifications involves these steps: Architectural. Interface.
1. Interface Design
2. Architectural Design
3. Detailed Design
Overall S/w design process:
Data Design:
Architectural Design:
Architectural design is the designing and planning of structures where functionality
and aesthetics are the two key elements of the process. The design must be suitable for
the experience of the user as well as meet the needs of the client and or project
requirements.
The conceptual data model represents the overall structure of data required to support
the business requirements independent of any software or data storage structure.
Object classes are rectangles with the name at the top, attributes in the middle section
and operations in the bottom section.
Relationships between object classes (known as associations) are shown as lines
linking objects.
Inheritance is referred to as generalization and is shown upwards rather than
downwards in a hierarchy.
Example: - Library Class Hierarchy: Multiple inheritance:
Classification of Diagrams in UML:
Structural model represents the framework for the system and this framework is the
place where all other components exist. Hence, the class diagram, component diagram
and deployment diagrams are part of structural modelling. They all represent the
elements and the mechanism to assemble them.
Class: Description of a set of objects sharing the same attributes, operations and
semantics.
Attributes:
Named properties of class representing the state of the objects
It is the extension of Classical Data Structures
It can include type and default values.
Sequence diagrams:
A sequence diagram is a Unified Modelling Language (UML) diagram that illustrates
the sequence of messages between objects in an interaction. A sequence diagram
consists of a group of objects that are represented by lifelines, and the messages that
they exchange over time during the interaction.
Example Sequence Diagram:
Collaboration Diagrams:
A collaboration diagram, also known as a communication diagram, is an
illustration of the relationships and interactions among software objects in the
Unified Modelling Language (UML).
Actors: In the collaboration diagram, the actor plays the main role as it invokes the
interaction. Each actor has its respective role and name. In this, one actor initiates the
use case.
Links: The link is an instance of association, which associates the objects and actors.
It portrays a relationship between the objects through which the messages are sent. It
is represented by a solid line. The link helps an object to connect with or navigate to
another object, such that the message flows are attached to links.
Use-case diagrams describe the high-level functions and scope of a system. These
diagrams also identify the interactions between the system and its actors. The use
cases and actors in use-case diagrams describe what the system does and how the
actors use it, but not how the system operates internally.
There are four main components of a use case diagram are actors, systems,
relationships, and use cases. Actors are any human or external system that interacts
with the system. Systems are the main components of the system being modelled.
Relationships show how the actors and systems interact with each other.
Component Diagram: