Software Engineering

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

SOFTWARE

DESIGN
Software design is the process of planning and organizing the structural components
of a software system. It’s like creating a blueprint for building programs that meet
user needs and work well. Here are some key points:
1. Abstraction and Modularity: Break down complex tasks into smaller,
manageable parts. Abstraction hides unnecessary details, while modularity
promotes separation of concerns.
2. User Interaction (UI/UX): Design how users will interact with the software.
This includes creating intuitive interfaces and ensuring a positive user
experience.
3. Security: Consider how to keep data safe within the software.
4. General Tasks Involved:
1. Requirements Analysis: Understand user needs and system requirements.
2. Architectural Design: Define the overall structure, components, and their
interactions.
3. Detailed Design: Specify algorithms, data structures, and interfaces.
4. Interface Design: Define communication between different modules.
5. Data Design: Plan data storage and retrieval mechanisms.
6. Component-Level Design: Design individual modules or classes.
7. Testing and Validation: Ensure the design meets requirements.

5.Design Principles:
 Traceable to Analysis Model: The design should satisfy all requirements from
the analysis phase.
 Minimize Intellectual Distance: Bridge the gap between real-world problems
and software solutions.
 Exhibit Uniformity and Integration: Maintain consistency throughout the
design.
 Accommodate Change: Design should be flexible to adapt to user needs.
 Degrade Gracefully: Software should handle errors gracefully during
execution.
 Assess for Quality: Evaluate the design’s quality.
 Review to Discover Errors: Regularly review the design.
 Remember: Design is not coding; it describes the logic, while coding
implements it

Certainly! Good software design is crucial for creating high-quality software. It involves planning and
organizing the structural components of a system. Here are the key criteria for enhancing software
quality:

1. Functionality: The software meets requirements and behaves as expected in its intended
environment.

2. Usability: It’s easy to use, providing a positive user experience.

3. Reliability: Free of defects, performs consistently, and accurately under various conditions.

4. Performance: Efficient, quick, and capable of handling large data or traffic.

5. Security: Protected against unauthorized access and malicious attacks.

6. Maintainability: Easy to change, well-documented, and understandable by other developers.

7. Reusability: Designed for code reuse in other projects or applications.

8. Scalability: Handles increasing workloads and adapts to changing requirements.

9. Testability: Designed for easy testing and validation.


Various phases of software design
The software design process can be divided into the following three levels or phases
of design:
1. Interface Design
2. Architectural Design
3. Detailed Design

Interface Design
Interface design is the specification of the interaction between a system and its
environment. This phase proceeds at a high level of abstraction with respect to the
inner workings of the system i.e, during interface design, the internal of the systems
are completely ignored, and the system is treated as a black box. Attention is focused
on the dialogue between the target system and the users, devices, and other systems
with which it interacts. The design problem statement produced during the problem
analysis step should identify the people, other systems, and devices which are
collectively called agents.

Architectural Design
Architectural design is the specification of the major components of a system, their
responsibilities, properties, interfaces, and the relationships and interactions between
them. In architectural design, the overall structure of the system is chosen, but the
internal details of major components are ignored. Issues in architectural design
includes:
1. Gross decomposition of the systems into major components.
2. Allocation of functional responsibilities to components.
3. Component Interfaces.
4. Component scaling and performance properties, resource consumption
properties, reliability properties, and so forth.
5. Communication and interaction between components.
Detailed Design
Detailed design is the specification of the internal elements of all major system
components, their properties, relationships, processing, and often their algorithms
and the data structures. The detailed design may include:
1. Decomposition of major system components into program units.
2. Allocation of functional responsibilities to units.
3. User interfaces.
4. Unit states and state changes.
5. Data and control interaction between units.
6. Data packaging and implementation, including issues of scope and
visibility of program elements.
7. Algorithms and data structures.
Importance of System Architecture Design:
1. Structuring: System architecture provides a framework for organizing components, ensuring
clarity and coherence.
2. Parallel Development: It allows concurrent development of subsystem specifications.
3. Manufacturing and Costing: Enables hardware manufacturing by sub-contractors and
provides a model for system costing

Steps in the Software Design Process:

1. Understanding Project Requirements:


o Comprehend and document system requirements.
2. Research, Analysis, and Planning:
o Investigate technology options and select appropriate frameworks.
3. Design:
o High-level structure: Develop architectural design.
o Database design: Define schema, tables, and relationships.
o User interface design: Specify user interactions.
o Component-level design: Detail functionality and algorithms.
4. Prototyping:
o Create prototypes to validate design decisions.
5. Evaluation:
o Review and validate the design, iterate as needed

Modularity and its Properties


The module simply means the software components that are been created by
dividing the software. The software is divided into various components that work
together to form a single functioning item but sometimes they can perform as a
complete function if not connected with each other. This process of creating software
modules is known as Modularity in software engineering. The basic principle of
Modularity is that “Systems should be built from cohesive, loosely coupled
components (modules)” which means s system should be made up of different
components that are united and work together in an efficient way and such
components have a well-defined function.

Here are the key properties of modularity in software design:


1. Modular Decomposability:
o Break down complex problems into smaller, manageable sub-problems.
o Solve these sub-problems independently, reducing overall complexity.
2. Modular Composability:
o Assemble modules into a cohesive system.
o Define clear interfaces for combining components.
3. Modular Understandability:
o Ensure each module is easy to comprehend.
o Facilitate development and maintenance.
4. Modular Continuity:
o Allow individual module changes without affecting the entire system.
o Maintain consistency during updates.
5. Modular Protection:
o Safeguard modules from unintended changes or disruptions.

Structure Charts
A structure chart (also known as a module chart or hierarchy chart) is a graphical representation of a
software system’s components. It showcases the hierarchical relationships between modules. Here are the
key points about structure charts:

1. Decomposition: A structure chart breaks down a problem into subproblems.


2. Hierarchical Representation: It illustrates how modules relate to each other.
3. Symbols:
o Module: Represents a process or task within the system. Types include control modules,
submodules, and library modules.
o Conditional Call: Allows control modules to select submodules based on conditions.
o Loop: Represents repetitive execution of a module.
o Data Flow: Shows data movement between modules.
o Control Flow: Indicates control transfer between modules.
o Physical Storage: Represents where information is stored

Rules for drawing good structure chart are:


1. Review DFDs and Object Models:
o Understand the system’s data flow diagrams (DFDs) and object models.

o Identify key modules and their relationships.

2. Identify Modules and Relationships:


o Break down the system into functional modules.

o Define how these modules interact with each other.

3. Add Couples, Loops, and Conditions:


o Use conditional calls to select submodules based on conditions.

o Represent repetitive execution with loops.


o Consider coupling between modules.

4. Analyse the Structure Chart:


o Ensure clarity, consistency, and correctness.

o Validate against DFDs and the data dictionary.

Pseudocode is a step-by-step description of an algorithm, expressed in simple


English language text. It helps bridge the gap between an idea and its implementation in a
high-level programming language. Here are some key points about writing pseudocode:
1. Organize the Sequence of Tasks:
o Start by establishing the main goal or aim of your program.
o Break down the problem into smaller steps or tasks.
2. Use Standard Programming Structures:
o Employ familiar structures like if-else, for, and while loops.
o Indent statements within these structures for clarity.
3. Appropriate Naming Conventions:
o Use simple and distinct names for variables and commands.
o Reserve keywords (e.g., IF, ELSE) in capital letters.
4. Clear and Concise:
o Ensure that each section of pseudocode is complete, finite, and easy to
understand.
o Explain what will happen in the actual code.
5. Avoid Programming Language Syntax:
o Pseudocode is for human understanding, so minimize technical terms.
o Don’t write pseudocode in a specific programming language.
Now, let’s look at an example. Suppose we want to find the largest of two numbers:

BEGIN
NUMERIC nNum1, nNum2
INPUT nNum1, nNum2
IF nNum1 > nNum2 THEN
DISPLAY "The largest number is", nNum1
ELSE
DISPLAY "The largest number is", nNum2
END IF
END

Low-level design (LLD) is a crucial phase in software development that


follows a step-by-step refinement process. Let’s dive into the details:
1. What is LLD?
o LLD focuses on detailed design and logic of individual
modules within a system.
o It bridges the gap between high-level design (HLD) and actual
coding.
o In LLD, we specify algorithms, data structures, and interfaces for
each component.
2. Difference Between HLD and LLD:
o HLD (High-Level Design):
 Considers trade-offs between frameworks, components, and
databases.
 Defines system components and their interactions.
 Not concerned with actual code.
o LLD:
 Transforms HLD into detailed blueprints.
 Addresses specific implementation details.
 Closer to actual coding.
3. How to Form LLD from HLD?
o Use Unified Modeling Language (UML) diagrams:
 Class diagrams: Show entities, methods, and relationships.
 Sequence diagrams: Illustrate interactions between
components.
o Apply OOP principles (like encapsulation, inheritance, and
polymorphism).
o Follow SOLID principles (Single Responsibility, Open/Closed,
Liskov Substitution, Interface Segregation, Dependency Inversion).
4. Roadmap to Low-Level Designing:
o Master OOP Concepts: Understand inheritance, encapsulation,
abstraction, and polymorphism.
o Learn Design Patterns: Familiarize yourself with common
patterns (e.g., Singleton, Factory, Observer).
o Study SOLID Principles: Apply these principles to create robust
designs.
o Practice with Examples: Solve LLD problems using UML
diagrams and code snippets.
Types of low-level design:
i. Modularization
ii. Structure chart
iii. Pseudo-code

You might also like