FSeng Chapter 5 - Software Design and System Modeling
FSeng Chapter 5 - Software Design and System Modeling
Software design refers to the process of conceptualizing how a software system will be
implemented, and specifying the structure, behavior, and characteristics of a software
system to meet specific requirements and quality criteria.
During this phase, the software architecture, components, modules, interfaces, and data
are defined in detail.
Cont.
To achieve this, the design phase takes the SRS document and transform the
requirements specified in the SRS document into a structure that is suitable for
implementation using a programming language in the subsequent (coding) phase.
So, software design creates a blueprint, representation or model of the software which
provides detail about software architecture, data structures, interfaces, and
components that are necessary to implement the system.
The Design Process
➢ A good software design is seldom realized by using a single step procedure, rather it
➢ decomposing the system into subsystems, components and many small functionally
independent modules,
When designing such systems, therefore, the logical approach is to identify the
subsystems that should compose the system, the interfaces of these subsystems, and
the rules for interaction between the subsystems.
Meaning, architecture partitions the system in to logical parts such that each part can
be understood independently, and then describes the system in terms of these parts
and as a set of communicating components.
Cont.
Software architecture refers to the fundamental organization of a software system,
encompassing its components, structure, relationships, and principles governing their
design.
➢ Components: The building blocks of the software system, each responsible for specific
functionality.
➢ Structure: The arrangement and organization of components within the system, defining
how they interact and collaborate to achieve the system's goals.
The architectural design for software is the equivalent to the floor plan of a house.
The floor plan depicts the overall layout of the rooms; their size, shape, and
relationship to one another; and the doors and windows that allow movement into and
out of the rooms.
Likewise, software architectural design elements give us an overall view of the software.
One major aspect to keep in mind is that, due to a wide range of options now available
for how a system may be configured and connected, carefully designing the
architecture becomes very important.
Thus, selecting appropriate architectural styles and patterns is key to achieve the
desired system qualities.
2. Low-level design
Detailed design focuses on refining the high-level architecture and system components
identified in earlier stages into more concrete details.
➢Designing the user interface (UI) components, layout, navigation flow, and
interaction patterns to create an intuitive and visually appealing user experience.
❖ Initially the design is represented at a high level of abstraction and the blueprint
depicts a holistic view of software.
There are two fundamentally different approaches to software design that are in use
today. These are:
2. Object-oriented design.
1. Function-oriented Design
This is a design approach in which a system is designed from a functional viewpoint to
achieve functional decomposition of the system.
That is, each function that the system needs to perform is analyzed, hierarchically
decomposed into more detailed functions and mapped to a module structure.
Each object essentially contains its own data that is called attributes of the object and
associated set of operations (termed as methods) that operate on those data.
So, objects are the basic building blocks of an OO design, just like functions and
modules are for a function-oriented design.
➢This is a top-down strategy where a design is refined with increasing levels of details.
➢The process should proceed from a highly conceptual model to lower level details.
Information Hiding
➢ Modules should be specified and designed so that information (algorithms and data)
contained within a module is obscured and inaccessible to other modules that have no
need for such information.
Cont.
Abstraction
➢ Abstraction is the removal of the irrelevant and the amplification of the essentials.
Coupling
➢ Cohesion is a measure that defines the degree to which different elements within
Each problem and its solution is described by a design pattern that has been cataloged and
vetted by other software engineers who have encountered the problem and implemented
the solution while designing other applications.
By using these existing proven design patterns, you can avoid “reinventing the wheel” and
save time and effort.
Good Software Design
A few desirable characteristics that every good software design must possess are:
A. Understandability: A good design should be easily understandable.
➢ Unless a design solution is easily understandable, it would be difficult to implement and
maintain it.
➢ This would lead to severely increased development costs and the effort required to
maintain the product.
➢ A design solution to be easily understandable:
B. Efficiency: A good design solution should adequately address resource, time, and cost
optimization issues.
➢ The design documents are reviewed by the members of the development team to
The review team checks the design documents especially for the following aspects:
❖ Traceability: check whether each requirement in the SRS document can be traced to the
design model and vice versa.
❖ Correctness: whether the algorithms and data structures of the detailed design are
correct.
❖ Different modules required: The different modules in the solution are identified. Each
module is a collection of functions and the data shared by these functions. Each module
should accomplish some well-defined task out of the overall responsibility of the software.
❖ Control relationships among modules: A control relationship between two modules essentially
arises due to function calls across the two modules.
❖ Interfaces among different modules: The interfaces between two modules identifies the exact
data items that are exchanged between the two modules when one module invokes a
function of the other module.
Cont.
❖ Data structures of the individual modules: Each module normally stores some data that the
functions of the module need to share to accomplish the overall responsibility of the
module. Suitable data structures for storing and managing the data of a module need to be
properly designed and documented.
❖ Algorithms required to implement the individual modules: Each function in a module usually
performs some processing activity. The algorithms required to accomplish the processing
activities of various modules need to be carefully designed and documented with due
considerations given to the accuracy of the results, space and time complexities
System Modelling
Cont.
An abstraction deliberately simplifies, leaves out detail and picks out the most salient
characteristics.
System modeling is the process of developing such abstract models of a system, with
each model presenting a different view or perspective of that system in order to
obtain a better understanding of the system being developed.
Cont.
A model can be used for a variety of purposes.
So, it is reasonable to expect that the models would vary with respect to the details they
capture and this would depend on the purpose for which these models are being
constructed.
Analysis models show "what" the system shall provide while a model constructed for
design purposes (design models) should capture all the design decisions on "how"
system shall be structured into components.
Cont.
A model in the context of software development can be textual, mathematical (formal),
or graphical.
Of these, graphical models are very popular among software developers because these
are easy to understand and construct.
Over the years, although various graphical models are proposed, Unified Modeling
Language (UML) is primarily the most prevalent graphical modeling language.
Cont.
As the name itself implies, UML is a standard modeling language for object-oriented
modeling.
➢ It can be used to visualize, specify, and document the artifacts of a software system.
As is the case with any other language, UML has its syntax (a set of basic symbols,
graphical notations and sentence formation rules) and semantics (meanings of basic
symbols and sentences).
The UML contains an extensive set of diagram types to help document several aspects
(views) of a design solution.
Cont.
In a broader view, UML diagrams mainly represent two different views of a system
model:
This view emphasizes the static structure of the system using objects, attributes,
operations and relationships.
❖ Class diagrams are used when developing an object-oriented system model to show
the object classes in a system and the associations between these classes.
Different representations of the LibraryMember class
Cont.
2. Dynamic (or behavioral) view
This view emphasizes the dynamic behavior of the system by showing collaborations
among objects and changes to the internal states of objects.
It captures interaction between user the system, interaction between the system being
developed and other systems or interaction between the components of the system.
For example use case diagrams, sequence diagrams, activity diagrams, state diagrams.
Cont.
Use case diagram is mostly used to model interactions between a system and external
actors (users or other systems).
➢ As the name implies, a sequence diagram shows the sequence of interactions that
take place during a particular use case or use case instance.
Activity diagrams are intended to show the activities that make up a given system
process and the flow of control from one activity to another.
Cont.
State diagrams are event-driven models that shows how a system responds to external
and internal events.
➢ It is based on the assumption that a system has a finite number of states and that
events (stimuli) may cause a transition from one state to another. So, State diagrams
show system states and events that cause transitions from one state to another.
Use case diagram of the Super market prize scheme
➢ A sequence diagram that illustrates the interactions involved in the View patient
information use case, where a medical receptionist can see some patient information.
Sample Activity diagram for Login
Sample state diagram