#Software Engineering Notes
#Software Engineering Notes
Software Engineering
Nature of Software
Software is more than just a program code. A program is an executable code, which serves some
computational purpose. Software is considered to be collection of executable programming code,
associated libraries and documentations. Software, when made for a specific requirement is called
software product.
• Reusability
• Adaptability
Maintenance
This aspect briefs about how well the software has the capabilities to maintain itself in the ever-
changing environment:
• Modularity
• Maintainability
• Flexibility
• Scalability
Types of Software:
System Software: Includes operating systems and utilities that manage computer resources at a low
level.
Application Software: Designed to help users perform specific tasks, such as word processing, web
browsing, and data management.
Embedded Software: Resides within devices to perform dedicated functions, such as in medical
devices, automobiles, and household appliances.
Software Engineering
Software engineering is an engineering branch associated with development of software product
using well-defined scientific principles, methods and procedures. The outcome of software
engineering is an efficient and reliable software product.
Key Principles
1. Modularity: Breaking down software into smaller, manageable components that can be
developed and tested independently.
3
2. Abstraction: Hiding the complex implementation details and exposing only the necessary
functionalities to users and other components.
3. Encapsulation: Bundling the data and methods that operate on the data within a single unit
(class), protecting the internal state from external interference.
4. Reusability: Designing components that can be reused across different projects to save time
and resources.
5. Maintenance: Regularly updating software to fix bugs, add features, and improve
performance.
6. Testing: Ensuring that the software meets its requirements and is free of defects through
various testing methodologies.
Need of Software Engineering
The need of software engineering arises because of higher rate of change in user requirements and
environment on which the software is working. Following are some of the needs stated:
• Large software
It is easier to build a wall than a house or building, likewise, as the size of the software becomes
large, engineering has to step to give it a scientific process.
• Scalability
If the software process were not based on scientific and engineering concepts, it would be easier to
re-create new software than to scale an existing one.
• Cost
As hardware industry has shown its skills and huge manufacturing has lower down the price of
computer and electronic hardware. But, cost of the software remains high if proper process is not
adapted.
• Dynamic Nature
Always growing and adapting nature of the software hugely depends upon the environment in which
the user works. If the nature of software is always changing, new enhancements need to be done in
the existing one. This is where the software engineering plays a good role.
• Quality Management
Better process of software development provides better and quality software product.
As a software engineer, you work within a social and legal framework that requires ethical and moral
responsibility beyond technical skills. Upholding honesty and integrity is crucial, and your actions
should reflect positively on the profession. Key areas of ethical responsibility include:
2. Competence: Accurately represent your skills and avoid work beyond your capabilities.
3. Intellectual Property: Protect the intellectual property rights of employers and clients,
adhering to local laws.
4. Computer Misuse: Avoid using your skills for unethical purposes, from trivial misuse to
serious cyber offenses.
Software Paradigms
• Software paradigms refer to the methods and steps, which are taken while designing the software.
There are many methods proposed and are implemented. But we need to see where in the
software engineering concept, these paradigms stand. These can be combined into various
categories, though each of them is contained in one another:
Case studies
To illustrate software engineering concepts, I use examples from four different types of system. I
have deliberately not used a single case study, as one of the key messages in this book is that
software engineering practice depends on the type of systems
Being produced. I therefore choose an appropriate example when discussing concepts such as safety
and dependability, system modeling and reuse etc.
The system types that are used as case studies in this book are:
1. An Embedded System
This is a system where the software controls some hardware device and is embedded in that device.
Issues in embedded systems typically include physical size, responsiveness, and power management,
etc. The example of an embedded system that I use is a software system to control an insulin pump
for people who have diabetes.
2. An Information System
The primary purpose of this type of system is to manage and provide access to a database of
information. Issues in information systems include security, usability, privacy, and maintaining data
integrity. The example of an information system used is a medical records system.
3. A Sensor-Based Data Collection System
This is a system whose primary purposes are to collect data from a set of sensors and to process that
data in some way. The key requirements of such systems are reliability, even in hostile
environmental conditions, and maintainability. The example of a data collection system that I use is a
wilderness weather station.
4. A Support Environment
This is an integrated collection of software tools that are used to support some kind of activity.
Programming environments, such as Eclipse (Vogel 2012) will be the most familiar type of
environment for readers of this book. I describe an example here of a digital learning environment
that is used to support students’ learning in schools.
I introduce each of these systems in this chapter; more information about each of them is available
on the website (software-engineering-book.com).
Professional software development is a structured activity where software is created for business
purposes, for inclusion in other devices, or as a product (e.g., information systems, CAD systems).
Unlike personal or amateur programming, professional software is typically used by others and often
developed by teams.
Software Components:
6
• Software is not just the code but also includes associated documentation, libraries, support
websites, and configuration data that make the software functional and user-friendly.
• Professional software systems often consist of multiple programs, configuration files, and
extensive documentation for both users and developers.
1. Generic Products:
Blurring Lines:
• The distinction between generic and customized software is becoming less clear. Many systems
now use generic products as a base, which are then adapted to meet specific customer needs (e.g.,
ERP systems from SAP, Oracle).
• Quality considerations extend beyond what the software does to include its behavior, structure,
and documentation.
• Non-functional attributes, such as response time and code understandability, are critical to
professional software.
• The required quality attributes depend on the application: safety for aircraft control systems,
responsiveness for games, reliability for telephone systems, etc.
Software engineering practice involves applying principles, methods, and tools to achieve high-
quality software development and maintenance. It is a disciplined approach to producing software
systems that are reliable, efficient, and meet user requirements. Here are key aspects of software
engineering practice:
Selecting an appropriate Software Development Life Cycle (SDLC) model, such as Agile, Scrum, or
Waterfall, is crucial for aligning project requirements with development processes. Agile is ideal for
projects with evolving requirements and frequent stakeholder feedback, while Waterfall may suit
projects with well-defined and static requirements.
2. Coding Standards:
Adhering to coding best practices is vital for maintaining a clean and efficient codebase. This
includes writing readable code, following naming conventions, and ensuring that code is well-
structured to facilitate maintenance and collaboration. Inline comments and thorough code
documentation further enhance code clarity.
3. Testing Practices:
Implementing rigorous testing methodologies, including unit testing, automated testing, behavior-
driven development (BDD), and test-driven development (TDD), ensures that the software functions
correctly and meets quality standards. Regular code reviews and continuous testing help identify
potential issues early in the development process.
4. Documentation:
Comprehensive documentation is essential for maintaining clarity about the software's functionality
and design. This includes both technical documentation for developers and user documentation for
end-users. Documentation aids in onboarding new team members, supports future development, and
provides an audit trail for compliance and quality assurance.
5. Version Control:
Utilizing version control systems (like Git) is critical for managing changes to the codebase,
facilitating collaboration among team members, and maintaining a history of code modifications.
Employing branching strategies, such as Git Flow, and ensuring regular, descriptive commits can
further streamline development.
Implementing CI/CD practices allows for automated testing and deployment of software, enhancing
efficiency and reducing the risk of errors during the release process. Setting up a CI/CD pipeline
early in the project is essential for seamless integration and delivery.
7. Microservices Architecture:
8. Ethical Considerations:
Software engineers should adhere to ethical standards, including the ACM Code of Ethics, which
emphasizes acting in the public interest, maintaining integrity, and ensuring the highest professional
8
standards. Additionally, privacy and security considerations should be integral to the development
process, adhering to legal requirements and industry standards.
Following these best practices not only improves the quality of the software but also enhances team
collaboration, reduces errors, and increases overall productivity. By building a strong foundation
based on these principles, software engineers can effectively respond to evolving user needs and
technological advancements, ensuring their projects are successful and sustainable in the long term.
9
The Software Development Life Cycle (SDLC) is a well-defined, structured sequence of stages in
software engineering that ensures the efficient development of a software product. It provides a
framework that guides the entire software development process, from initial concept to deployment
and maintenance.
SDLC Activities
1. Communication
The first step in the SDLC involves initial communication between the client and the service
provider. This phase includes brainstorming, understanding the high-level objectives, and discussing
the scope of the project. The client submits a formal request for the desired software product, and
both parties work to establish a mutual understanding of the project's goals.
2. Requirement Gathering
In this phase, the software development team engages with various stakeholders to gather detailed
information about the requirements. These requirements are categorized into user requirements,
system requirements, and functional requirements. The team employs various techniques such as
studying existing systems, conducting interviews, and using questionnaires. The gathered
information is then documented clearly to ensure all stakeholders have a common understanding of
what needs to be developed.
3. Feasibility Study
10
After gathering requirements, the team conducts a feasibility study to analyze whether the software
can be designed to meet the user’s needs. This analysis includes technical, operational, and economic
feasibility. The team assesses if the project is financially viable, technically feasible, and practically
achievable within the given constraints.
4. System Analysis
During system analysis, developers create a roadmap and select the most suitable software model for
the project. This phase involves understanding system limitations, identifying potential changes to
existing systems, and analyzing the project's impact on the organization. The team uses various
models, such as use case diagrams and data flow diagrams, to map out system interactions and
ensure all aspects are considered.
5. Software Design
In the software design phase, the knowledge gathered during the requirement gathering and system
analysis phases is translated into a detailed design. This phase is divided into high-level design,
which defines the architecture, and detailed design, which defines specific modules and their
interactions. The output includes logical and physical designs, data dictionaries, and pseudo-codes.
Design reviews are conducted to ensure the design aligns with the project requirements.
6. Coding
The coding phase, also known as programming, is where the software design is implemented through
writing program code. Developers follow coding standards, use version control systems, and conduct
peer reviews to ensure the code is clean, efficient, and consistent. The goal is to produce error-free,
executable programs that align with the software design.
7. Testing
Testing is a critical phase that ensures the software functions as intended. It includes various levels
of testing such as unit testing, integration testing, system testing, and acceptance testing. Automated
testing tools are often used to improve efficiency and reliability. Early identification and resolution
of errors are crucial to maintaining the software's quality and dependability.
8. Integration
This stage involves integrating the software with external entities like libraries, databases, and other
programs. Continuous integration tools are commonly used to automate the process, enabling regular
integration of code changes and automated testing. This helps in identifying and resolving integration
issues promptly.
9. Implementation
Implementation involves installing the software on user machines and configuring it for different
environments. This phase may include user training and providing comprehensive documentation to
ensure smooth adoption and operation of the software. The software is tested for portability,
adaptability, and any integration-related issues are addressed.
The operation and maintenance phase ensures that the software continues to operate efficiently with
minimal errors. Ongoing monitoring, regular updates, and user feedback are essential during this
phase. Users are supported with documentation and training as needed. This phase also involves
addressing hidden bugs and making necessary adjustments as real-world conditions evolve.
Conclusion
The SDLC provides a structured approach to software development, ensuring that each phase is
carefully planned and executed. By following this systematic process, software engineers can
develop high-quality, reliable software that meets user needs, adapts to changes, and remains
sustainable in the long term.
The waterfall model: This takes the fundamental process activities of specification, development,
validation, and evolution and represents them as separate process phases such as requirements
specification, software design, implementation, and testing.
Incremental development: This approach interleaves the activities of specification, development, and
validation. The system is developed as a series of versions (increments), with each version adding
functionality to the previous version.
Integration and configuration: This approach relies on the availability of reusable components or
systems. The system development process focuses on configuring these components for use in a new
setting and integrating them into a system.
12
Waterfall Model
The first published model of the software development process was derived from engineering
process models used in large military systems engineering (Royce 1970). It presents the software
development process as a number of stages, as shown in Figure. Because of the cascade from one
phase to another, this model is known as the waterfall model or software life cycle. It follows a linear
and sequential approach, where each phase must be completed before the next begins.
Phases:
1. Requirements analysis and definition
The system’s services, constraints, and goals are established by consultation with system users. They
are then defined in detail and serve as a system specification.
2. System and software design
The systems design process allocates the requirements to either hardware or software systems. It
establishes an overall system architecture. The system’s architecture is designed based on the
requirements. This phase produces a blueprint for the system.
3. Implementation and unit testing
During this stage, the software design is realized as a set of programs or program units. Unit testing
involves verifying that each unit meets its specification.
4. Integration and system testing
The individual program units or programs are integrated and tested as a complete system to ensure
that the software requirements have been met. After testing, the software system is delivered to the
customer.
5. Operation and maintenance
13
Normally, this is the longest life-cycle phase. The system is installed and put into practical use.
Maintenance involves correcting errors that were not discovered in earlier stages of the life cycle,
improving the implementation of system units, and enhancing the system’s services as new
requirements are discovered.
Advantages:
• Simple and easy to understand and use.
• Phases are processed and completed one at a time.
• Suitable for smaller projects with well-understood requirements.
Disadvantages:
• Inflexible; it is difficult to accommodate changes after the process has started.
• Poor model for long and ongoing projects.
• Not suitable for complex projects or projects with changing requirements.
Incremental Model
Incremental development is based on the idea of developing an initial implementation, getting
feedback from users and others, and evolving the software through several versions until the required
system has been developed (Figure 2.2). Specification, development, and validation activities are
interleaved rather than separate, with rapid feedback across activities.
Phases:
1. Outline Description
The process starts with an initial idea or requirement, called the "Outline Description." This is a
high-level understanding of what the system should do, encompassing key objectives, features, and
constraints.
14
The outline provides a basis for the first version of the software, guiding the development of the
initial implementation.
Concurrent Activities
2. Specification
This involves defining and refining the system's requirements. Specifications are not fully detailed at
the start but evolve as the development progresses.
Process
Development is the actual coding and building of the software based on the specifications. This is
done in increments, with each increment building upon the previous one.
Process:
• The first increment might implement core functionalities, creating a basic version of the
software.
• Subsequent increments add new features, enhancements, or fixes to the previous version.
• Development is iterative, meaning that new versions of the software are produced at regular
intervals, incorporating feedback from users and stakeholders.
4. Validation:
Validation ensures that each increment of the software meets the required specifications and
performs as expected. This includes testing, reviewing, and getting feedback.
Process:
• After each development cycle, the increment is tested to verify that it meets the requirements.
• Feedback from testing, users, and stakeholders is used to improve the next increment.
• Validation can involve unit testing, integration testing, system testing, and user acceptance
testing, ensuring the software increment is functional and meets user expectations.
Feedback Loops:
Interactions: There are feedback loops between the Specification, Development, and Validation
activities. This means:
15
• As development progresses, the need for specification changes may become apparent, leading to
refinement of requirements.
• Validation may reveal issues or suggest enhancements, influencing both ongoing development
and the specification for future increments.
• The feedback loops enable rapid adjustment to the software as new insights and requirements are
discovered, ensuring the software remains aligned with user needs and expectations.
Outputs: The process produces several versions of the software, each representing a more advanced
stage of the system.
i. Initial Version:
This is the first working version of the software. It may have limited functionality but provides a
foundation upon which further increments can be built.
The initial version is often used to gather early user feedback and ensure the core architecture is
sound.
These are successive versions that incorporate new features, improvements, or fixes based on
feedback and ongoing development.
Each intermediate version is more complete than the previous one, gradually moving closer to the
final product.
The final version is the completed software product, which incorporates all required features and
meets the final specifications.
After multiple iterations and feedback cycles, this version is considered fully functional and ready
for deployment.
Advantages:
• Allows partial implementation of the system and gets some functionality into the hands of
users quickly.
• Flexibility to make changes during development.
• Risk of failure is reduced as more critical functionalities are delivered first.
Disadvantages:
• Requires good planning and design to decide the increments.
• Each increment must be independently tested.
• The total cost might exceed the cost of using the Waterfall model.
16
3. Prototyping Model
The Prototyping Model is a software development approach that involves creating an early, working
version of the software system—called a prototype—with limited functionality. This model is
particularly useful when user requirements are not well-understood at the outset. The main goal is to
gather and refine requirements through continuous user feedback, allowing the development team to
better understand user needs and expectations before moving on to full-scale development.
Phases:
1. Requirement Analysis:
The first step involves gathering initial requirements for the system. These requirements are typically
not fully detailed, focusing on the aspects that are currently understood.
Since the understanding of requirements is incomplete at this stage, the focus is on capturing enough
information to build a meaningful prototype.
2. Quick Design:
The second phase could consist of a preliminary design or a quick design. During this stage, the
system’s basic design is formed. However, it is not a complete design. It provides the user with a
quick overview of the system.
3. Prototype Construction:
Based on the quick design, a working prototype is developed. The prototype has minimal
functionality but provides a tangible version of the system for users to interact with.
The prototype may include only the most critical features and a basic user interface, focusing on
those areas that need clarification or validation.
4. User Evaluation:
The prototype is presented to users for evaluation. Users interact with the prototype and provide
feedback on its functionality, usability, and overall alignment with their needs.
17
The development team observes how users interact with the prototype, noting any difficulties or
misunderstandings.
5. Refinement:
The prototype is refined through several iterations based on the feedback gathered during user
evaluation. This phase continues until the final system requirements are clear and well-defined.
Each iteration aims to bring the prototype closer to the users' expectations and the final product.
6. Full-Scale Development:
Once the requirements are stabilized and well-understood, the final system is developed following a
suitable software development model, such as the Waterfall or Incremental model.
The prototype is discarded, and the actual system is built from scratch using the finalized
requirements. The development team follows a structured approach to ensure that the system meets
all specified requirements and quality standards.
The fully developed and tested software system, ready for deployment and use.
Advantages:
• Increased user involvement in the product even before its implementation.
• Since a working model of the system is displayed, the users get a better understanding of the
system being developed.
• Quicker user feedback is available leading to better solutions.
• Missing functionality can be identified easily.
Disadvantages:
• Risk of insufficient requirement analysis owing to too much dependency on the prototype.
• Users may get confused in the prototypes and actual systems.
• Practically, this methodology may increase the complexity of the system as scope of the
system may expand beyond original plans.
• The cost of developing prototypes can be high, especially for complex systems.
• Evolutionary Prototyping
Evolutionary prototyping also called as breadboard prototyping is based on building actual functional
prototypes with minimal functionality in the beginning. The prototype developed forms the heart of
the future prototypes on top of which the entire system is built. By using evolutionary prototyping,
the well-understood requirements are included in the prototype and the requirements are added as
and when they are understood.
• Incremental Prototyping
Incremental prototyping refers to building multiple functional prototypes of the various sub-systems
and then integrating all the available prototypes to form a complete system.
• Extreme Prototyping
Extreme prototyping is used in the web development domain. It consists of three sequential phases.
First, a basic prototype with all the existing pages is presented in the HTML format. Then the data
processing is simulated using a prototype services layer. Finally, the services are implemented and
integrated to the final prototype. This process is called Extreme Prototyping used to draw attention to
the second phase of the process, where a fully functional UI is developed with very little regard to
the actual services.
4. Spiral Model
The Spiral Model is a risk-driven software development process model that combines the iterative
development (prototyping) with the systematic aspects of the Waterfall model. It was proposed by
Barry Boehm in 1986. It is risk-driven and emphasizes the identification and reduction of risks at
each iteration. The Spiral Model is particularly well-suited for large, complex, and high-risk projects.
Key Features:
1. Risk Management: The Spiral Model is unique in its focus on identifying and managing
risks throughout the project. Each phase in the spiral involves risk assessment and resolution
activities to mitigate potential issues.
2. Iterative Development: The project passes through multiple iterations (or spirals), each
encompassing the steps of planning, risk analysis, engineering, and evaluation. With each
loop in the spiral, the system becomes completer and more refined.
3. Flexibility: The model allows for changes and refinements at each stage, accommodating
evolving requirements and reducing the risk of project failure.
19
Phases
1. Objective Identification (Planning):
In the initial phase, requirements are gathered, and a plan is created. This involves defining the
project’s goals, considering various alternatives, and understanding any constraints. It's a critical step
to set a clear direction for the project.
2. Risk Management (Analysis & Risk Evaluation):
During this phase, potential risks are identified, and strategies are developed to manage or mitigate
them. A thorough risk analysis is conducted to identify challenges related to cost, time, technical
difficulties, and user acceptance. Prototyping and simulations may be employed to explore areas of
high risk, ensuring that the project can move forward with a clearer understanding of potential
pitfalls.
3. Prototyping (Engineering & Development):
Prototypes are developed and tested with stakeholders, providing a tangible model to refine
requirements and system design. This phase involves not only the creation of a working prototype or
partial system but also coding, testing, and integration activities. Through iterative refinement, the
prototype evolves based on feedback, bringing the system closer to the desired final product.
4. User Evaluation (Customer Evaluation & Verification):
20
Feedback from users and stakeholders is crucial at this stage to validate the system's current version.
Users interact with the prototype or partial system, offering insights into functionality, performance,
and design. This feedback is then used to guide further iterations in the spiral process, ensuring that
the system meets user needs.
5. Refinement (Engineering & Implementation):
The system undergoes continuous development and refinement throughout each spiral, gradually
incorporating detailed design, coding, testing, and integration. With each iteration, the system moves
closer to meeting the final set of requirements, evolving into a completer and more robust product.
6. Next Phase Planning (Review & Planning for the Next Spiral):
After each iteration, the current state of the project is reviewed, and plans are made for the next
phase. This includes re-assessing risks, refining the project plan, and updating objectives and
schedules to ensure the project stays on track.
7. Release (Final System Delivery & Maintenance):
Once all spiral iterations are complete, the fully developed and tested system is delivered to the
customer. A maintenance plan is established to ensure the system remains functional and up-to-date,
allowing for ongoing improvements based on user feedback and evolving needs.
• Risk Reduction: The focus on risk management helps identify and mitigate risks early in the
development process, reducing the chances of project failure.
• Flexibility: The iterative nature of the Spiral Model allows for changes and refinements at
each stage, accommodating evolving requirements and reducing rework.
• Customer Involvement: Regular feedback from users and stakeholders ensures that the
system meets their needs and expectations, leading to a higher quality final product.
• Complexity: The Spiral Model is complex and can be difficult to manage, especially for
smaller projects or teams with limited resources.
• High Cost: The iterative nature of the model, combined with the focus on risk management,
can lead to higher costs compared to simpler models.
• Requires Expertise: Successful implementation of the Spiral Model requires experienced
project managers and developers who can effectively manage risks and iterations.
• Large and Complex Projects: The Spiral Model is ideal for large, complex projects with
significant risks and uncertainties.
• High-Risk Projects: The model is well-suited for projects with high risks, such as those
involving new technologies or uncertain requirements.
• Iterative Development: The model is suitable for projects that benefit from iterative
development, where requirements may evolve over time based on user feedback.
Phases:
1. Requirement Planning
In this phase, users, stakeholders, and developers collaborate to discuss and finalize the project
requirements. The goal is to establish a clear understanding of what needs to be developed but within
a condensed timeframe compared to traditional methods. This phase is focused on quickly
identifying key requirements and setting expectations rather than detailed planning.
2. User Design
This phase involves taking user feedback and building prototypes using developer tools. It includes
the re-examination and validation of data collected in the Requirement Planning phase. The iterative
nature of this phase means that prototypes are continuously refined based on user input, allowing for
frequent adjustments and improvements. This cyclical process helps ensure that the final system
closely aligns with user needs and expectations.
3. Construction
During the Construction phase, developers build the actual system based on the refined prototypes.
This phase involves coding, system integration, and testing of individual components using powerful
automated tools. Because of the extensive work done during the User Design phase, the Construction
phase can focus on speed and accuracy in transforming prototypes into the final product.
4. Cutover (Implementation)
In the Cutover phase, the final product is implemented, tested, and delivered to users. This phase
includes completing any remaining data conversion tasks, providing user training, and managing the
system changeover. The goal is to ensure that the system is fully functional, user-ready, and
seamlessly integrated into the existing environment.
Advantages:
Disadvantages:
• Customer Satisfaction: Prioritize early and continuous delivery of valuable software to satisfy
customers.
• Welcoming Change: Embrace changes in requirements, even late in development, to maintain
customer competitiveness.
• Frequent Delivery: Deliver working software frequently, preferring shorter timescales.
• Collaboration: Ensure daily collaboration between business and development teams.
• Motivated Individuals: Build projects around motivated individuals and trust them to get the
job done.
• Face-to-Face Communication: Use face-to-face conversation as the most efficient way to
convey information.
24
Scrum is an Agile framework for managing and completing complex projects. It is widely used in
software development but can be applied to any project that requires a flexible, iterative approach.
Scrum emphasizes collaboration, accountability, and iterative progress toward a well-defined
goal.Lifecycle of Scrum
Phases:
• Sprint Planning: Define the goal and tasks for the upcoming sprint.
• Daily Stand-up: Short, daily meetings to discuss progress and challenges.
• Sprint Review: Review and demonstrate the work completed during the sprint.
• Sprint Retrospective: Reflect on the sprint and identify areas for improvement.
Scrum Artifacts
1. Planning:
In this phase, the team collaborates with the customer to gather requirements in the form of user
stories. The planning also involves setting values, defining acceptance test criteria, and creating an
iteration plan.
2. Design:
The design phase focuses on creating a simple design using tools like CRC cards (Class-
Responsibility-Collaborator cards) and spike solutions or prototypes to explore possible solutions.
3. Coding:
During coding, XP practices such as pair programming are followed, where two developers work
together. The code undergoes continuous integration, and refactoring is done to improve code
quality without altering its functionality. Unit tests are written and executed to ensure the
functionality of the code.
4. Testing:
The testing phase includes acceptance testing to verify that the software meets the customer’s
needs. The project velocity (the rate at which user stories are completed) is computed, which helps
in planning future iterations.
5. Release:
28
The final phase is the release of a software increment. This refers to the delivery of functional
software that provides value to the customer.
Listening is an ongoing activity that occurs throughout all phases of XP. The development team
must actively listen to customer feedback, understand their evolving needs, and make necessary
adjustments. This phase ensures the product remains aligned with customer expectations and allows
the team to respond to changes swiftly.
3. Kanban
Kanban is an Agile methodology that emphasizes visualizing workflows, managing work-in-progress
(WIP), and fostering continuous improvement. Originally developed in the late 1940s by Taiichi
Ohno at Toyota, Kanban was designed to improve manufacturing processes through just-in-time
production. It has since been adapted for use in various fields, particularly in software development,
where it helps teams manage tasks efficiently and respond to changing priorities.
Key Features of Kanban
1. Visual Management
At the heart of Kanban is the Kanban board, a visual tool that displays the workflow of tasks. The
board typically consists of columns representing different stages of the process (e.g., To Do, In
Progress, Done). Tasks are represented as cards that move across these columns as they progress
through the workflow, providing a clear overview of the current status of work items.
2. Work-in-Progress Limits
Kanban employs WIP limits to control the number of tasks that can be in progress at any given time.
This practice helps prevent bottlenecks and ensures that team members focus on completing current
tasks before taking on new ones. By limiting WIP, teams can maintain a steady flow of work and
improve overall efficiency.
3. Continuous Improvement
Kanban encourages teams to continuously assess and improve their processes. By regularly
reviewing workflow and performance metrics, teams can identify areas for enhancement and
implement changes incrementally. This focus on continuous improvement aligns with the Agile
principle of adapting to change.
4. Pull System
In Kanban, work is "pulled" into the workflow based on capacity rather than being "pushed" based
on forecasts or schedules. This means that new tasks are only started when there is available
capacity, which helps balance workload and reduces the risk of overcommitting resources.
Core Principles of Kanban
29
• Visualize the Workflow: Clearly display the workflow stages and current tasks to enhance
transparency and collaboration among team members.
• Limit Work in Progress: Set limits on the number of tasks that can be in progress at any time to
improve focus and efficiency.
• Manage Flow: Monitor and manage the flow of tasks through the system to identify bottlenecks
and optimize processes.
• Make Policies Explicit: Clearly define and communicate the rules and policies governing the
workflow to ensure everyone understands the process.
• Implement Feedback Loops: Regularly gather feedback from team members and stakeholders
to inform continuous improvement efforts.
Benefits of Kanban
• Flexibility: Kanban is adaptable to various workflows and can be integrated into existing
processes without requiring significant changes.
• Increased Efficiency: By visualizing work and limiting WIP, teams can reduce cycle times and
improve throughput.
• Enhanced Collaboration: The visual nature of Kanban boards fosters communication and
collaboration among team members, making it easier to coordinate efforts.
• Improved Responsiveness: Kanban allows teams to quickly adapt to changing priorities and
requirements, making it suitable for dynamic project environments.
In summary, Kanban is a powerful Agile methodology that focuses on visualizing workflows,
managing work-in-progress, and promoting continuous improvement. Its principles and practices
help teams enhance efficiency, collaboration, and adaptability, making it a valuable framework for
various industries, especially in software development.
Feature-Driven Development (FDD)
A model that focuses on delivering tangible, working features in a timely manner, emphasizing
design and building by feature.
Advantages and Disadvantages of Agile Models
In summary, Agile process models provide a flexible and collaborative framework for software
development, enabling teams to deliver high-quality products that meet user needs while adapting to
changes throughout the project lifecycle.
30
1. Feasibility Study
Analyzes the technical, operational, economic, and legal feasibility of the proposed system.
• Technical Feasibility: Evaluates whether the technical resources, both hardware and
software, and the team's skills are adequate to develop the project.
• Operational Feasibility: Assesses how well the proposed solution meets the business needs
and how easy it will be to operate and maintain.
• Economic Feasibility: Analyzes the cost versus benefits of the project, determining if it will
be financially viable.
• Legal Feasibility: Ensures the project complies with all relevant laws and regulations.
• Schedule Feasibility: Evaluates whether the project timeline is realistic and if deadlines can
be met.
2. Requirements Elicitation
Gathers requirements from stakeholders using techniques like interviews, surveys, focus groups, and
prototyping. The goal is to collect detailed information about stakeholder needs and expectations.
• Surveys: These are questionnaires that are distributed to stakeholders to gather information
about their needs and expectations.
• Focus Groups: These are small groups of stakeholders who are brought together to discuss
their needs and expectations for the software system.
34
• Observation: This technique involves observing the stakeholders in their work environment
to gather information about their needs and expectations.
• Prototyping: This technique involves creating a working model of the software system,
which can be used to gather feedback from stakeholders and to validate requirements.
3. Requirement Analysis
Requirement Analysis involves examining and understanding the requirements gathered during the
elicitation phase.
4. Requirements Specification
Requirements Specification formalizes the refined requirements into a detailed, clear, and
unambiguous document, typically a Software Requirements Specification (SRS). This document
includes an introduction to the project, detailed functional requirements (what the system should do),
non-functional requirements (performance criteria), and constraints (development limitations). The
SRS is supported by models and diagrams such as use case diagrams, DFDs, and ERDs.
• Verification ensures that the requirements are complete, consistent, and correctly
implemented.
• Validation checks that the requirements accurately reflect the needs and expectations of the
stakeholders.
• This process helps prevent errors from propagating through the development lifecycle,
reducing the need for costly modifications later.
6. Requirements Management
I. Functional Requirements
Functional requirements specify the specific behaviors, functions, and features that a system must
exhibit. They define what the system should do in response to inputs and the expected outputs. These
requirements are often articulated in terms of user interactions and system functionality.
35
Generalization
36
Aggregation
1. Context Models
A context model is a critical part of the analysis phase in software engineering, particularly during
the early stages of system specification. It provides a high-level representation of the system and its
environment, helping to define the system boundaries and its interactions with external entities
including users, other systems, devices, or external databases.
Define System Boundaries: It helps in deciding what is inside the system and what is outside, i.e.,
what the system will do and what will be handled by external systems or processes.
Identify External Interactions: It clarifies how the system will interact with other systems, external
entities, and users.
Simplify Communication: It serves as a visual tool to communicate the system's scope and
interactions to stakeholders.
Guide Design Decisions: It informs subsequent design decisions, such as data flow, security
considerations, and system integration points.
1. System Boundary:
The system boundary is the line that separates the system from its environment. It defines what is
part of the system and what is external.
Deciding the system boundary is a critical decision as it impacts the system's complexity, cost, and
the scope of development.
2. External Entities:
External entities include all users, systems, devices, or organizations that interact with the system but
are not part of it.
37
These could be human users (e.g., customers, administrators), external systems (e.g., databases,
payment gateways), or devices (e.g., sensors, IoT devices).
3. Interactions/Interfaces:
The interactions between the system and external entities are typically represented by lines or arrows
in the context model.
These interactions can represent data flows, control flows, user inputs, system outputs, or service
requests and responses.
4. Environment:
The environment in a context model refers to everything outside the system boundary that interacts
with the system.
The environment includes other systems, business processes, users, and external devices that interact
with the system.
Example
This example represents a context model for an Auto-Teller System (ATM), demonstrating the
interaction between the central ATM system and its external components. A context model is a high-
level diagram that shows the system's boundaries and its interactions with external entities, focusing
on how data flows between them.
The Auto-teller System is the central part of this context model. It represents the main software and
hardware system that performs the ATM's functions, such as processing transactions, managing user
inputs, and interacting with databases.
• Security:
Ensures that all operations performed by the ATM system are secure. This includes handling user
authentication, monitoring transactions for security threats, and managing encryption.
• Account Database:
Stores the details of users' accounts. The ATM system interacts with this database to retrieve account
information, check balances, and update transaction records after user interactions.
• Usage Database:
Records the usage data of the ATM, including transaction logs, frequency of use, and other analytics.
This information is useful for performance monitoring and optimizing the system's efficiency.
• Maintenance:
Manages the upkeep of the ATM system. It ensures that the system is functioning correctly,
schedules routine maintenance, and handles any repair requirements.
Represents the physical branch operations of the bank. The ATM system interacts with this
component to ensure that transactions made at the ATM are synchronized with the bank’s internal
systems, providing a seamless customer experience.
• Accounting System:
Handles the financial recording of transactions. The ATM system sends transaction data to the
accounting system to update the bank's financial records and ensure accurate accounting.
Bidirectional Arrows:
• The arrows between the Auto-teller System and the external entities indicate that there is a two-
way flow of data and commands. For example:
▪ The Auto-teller System sends transaction requests to the Account Database and receives
account information in return.
▪ It communicates with the Security system to authenticate users and ensure secure
transactions.
▪ Usage data is both sent to and retrieved from the Usage Database for monitoring
purposes.
▪ Maintenance signals might be sent to initiate a repair, and the Auto-teller System might
receive updates about the system's health from the Maintenance entity.
2. Interaction Models
39
The Interaction Model in software engineering is used to describe how various elements in a system
interact with each other. It focuses on the flow of messages and interactions between components or
objects, capturing how they collaborate to achieve specific functionalities or processes.
• Focuses on the structural relationships between the customer, shopping cart, order,
and payment objects, showing how they collaborate to handle an order.
3. Communication Diagram:
• Emphasizes the sequence of messages exchanged between the customer, shopping
cart, order, and payment objects during the order placement process.
Structural Models
Structural models represent the organization of a software system in terms of its components and
their relationships. These models can be either static (showing the design structure) or dynamic
(showing the structure during execution). Structural models are created during system design and can
represent both the overall system architecture and detailed object models.
These models are essential for visualizing, specifying, constructing, and documenting the
architecture of a software system.
Example:
Dynamic Models: Show the structure of the system as it operates, representing interactions
between components at runtime. These include sequence diagrams or collaboration diagrams.
4. Levels of Detail:
Structural models can be high-level, showing the overall system architecture, or more detailed,
focusing on specific components and their internal structure.
Common Structural Modeling Techniques:
• Class Diagrams: Illustrate the classes within a system and their relationships, including
inheritance, associations, and multiplicity.
• Package Diagrams: Group related classes or components into packages to show their
dependencies and interactions.
• Component Diagrams: Focus on the higher-level organization of the system, showing how
different software components interact and depend on each other.
• Deployment Diagrams: Model the physical deployment of software components on
hardware, representing how the system is distributed across different nodes.
Purpose of Structural Models:
• System Understanding: Provide a clear picture of the system's architecture and how
different parts fit together.
• Design Specification: Serve as blueprints for constructing the system, guiding the
development and implementation process.
• Documentation: Offer a formal way to document the system’s architecture, which is useful
for future maintenance and updates.
42
Behavioral Models
Behavioral models are models of the dynamic behavior of a system as it is executing. They show
what happens or what is supposed to happen when a system responds to a stimulus(inputs) from its
environment.
Key Concepts
• States: Represent the different conditions or situations that an object can be in during its lifecycle
(e.g., an order being "Pending" or "Shipped").
• Transitions: Represent the movement from one state to another in response to events (e.g.,
moving from "Pending" to "Processing" when payment is confirmed).
• Events: Triggers that cause a transition between states (e.g., a user submitting an order).
• Activities: Actions or tasks performed in a particular sequence or parallel during the system's
operation (e.g., updating inventory after an order is placed).
• Messages: Communications between objects or components, focusing on the order and timing of
these interactions.
• Clarifying Behavior: Helps in understanding how the system behaves under different
conditions.
• Identifying Issues Early: Aids in detecting potential problems like race conditions during
design.
• Facilitating Communication: Provides a common language for developers and stakeholders.
• Guiding Implementation: Acts as a blueprint, ensuring the system behaves as intended.
Let's consider an example of a behavioral model for an online shopping system. The key components
of the behavioral model might include:
1. Data-Driven Modeling
Data-driven models focus on the sequence of actions involved in processing input data to generate a
corresponding output. They map out the end-to-end processing from receiving input to producing
output, highlighting how data flows through the system.
Data Flow Diagrams (DFDs): Originally used in structured design methods, DFDs depict the
movement of data within a system and the processing steps. They are intuitive and useful for
understanding data processing but may lack detail in complex scenarios.
44
2. Event-Driven Modeling
Event-driven models depict how a system responds to external and internal events, illustrating how
the system transitions between different states based on events. These models are particularly useful
for real-time system
State Diagrams: UML state diagrams represent the system’s states and the transitions triggered by
events. They focus on how the system moves from one state to another based on stimuli.
Microwave Oven Control Software: The state diagram would show states such as "Waiting," "Half
Power," "Full Power," and "Cooking," with transitions triggered by user actions and events.
MDE is a software development approach where models, rather than programs, are the primary
outputs of the development process (Brambilla, Cabot, & Wimmer, 2012). In this approach,
executable programs are generated automatically from these models.
Key Concepts:
• Model Transformation: Converting models from one form to another, e.g., transforming a
platform-independent model to a platform-specific model.
• Meta-Modeling: Creating models that define the structure and semantics of other models.
• Automation: Generating code, documentation, or other artifacts directly from models.
Advantages:
• Higher Abstraction: Engineers can focus on high-level system design without being bogged
down by programming language specifics or platform details.
• Reduced Error Rate: By working at a higher level of abstraction, the likelihood of errors is
reduced, and the design and implementation processes are sped up.
• Reusability: Models are reusable across different platforms and contexts, facilitating easier
adaptation to new technologies.
Challenges:
45
• Adoption Issues: Despite its potential, MDE has not been widely adopted across the entire
software development lifecycle. This may be due to issues with tool support, complexity, and
the need for specialized skills.
Scope
MDE encompasses various aspects of the software engineering process, including model-based
requirements engineering, model-based development processes, and model-based testing.
Benefits:
• Improves productivity by enabling automation and reuse.
• Ensures consistency between design and implementation.
• Facilitates communication among stakeholders by providing visual representations.
Data Modeling
Data modeling is a critical aspect of software engineering that involves creating a visual
representation of data and its relationships within a system. It is crucial for designing databases and
ensuring data integrity.
It serves as a blueprint for how data is stored, accessed, and manipulated, ensuring that the system
meets its requirements effectively.
Key Concepts in Data Modeling
Entities: Entities represent real-world objects or concepts within a system that have data stored about
them.
Attributes: Attributes are properties or characteristics of entities that hold specific data values.
Relationships: Relationships define how entities are connected or related to each other within the
system.
Primary Keys: A primary key is a unique identifier for each record in an entity, ensuring that each
entry can be uniquely identified.
Foreign Keys: Foreign keys are attributes in one entity that link to the primary key of another entity,
establishing a relationship between the two.
Entity-Relationship Diagrams (ERD): A common tool used to visualize data models.
46
Purpose:
• To design databases that support the system’s requirements.
• To ensure data consistency, integrity, and security.
Functional Modeling
Functional modeling is a problem-solving tool that helps break down complex systems into
manageable components and map their functionality. It allows you to model a problem using
functional language and identify problematic and functional components within a system.
The key aspects of functional modeling include:
• Defining functions as actions between two components that change the parameters of an
object
• Identifying useful functions (expected parameter change), insufficient functions (below
expectation), excessive functions (above expectation), and harmful functions (unexpected
parameter change)
• Representing the functional view of a system through data flow diagrams (DFDs) that show
inputs, outputs, data stores, processes, and data flows.
47
Software Design
Software design involves several key aspects that work together to create a robust and effective
system.
1. Top-Down Design
Top-down design is a methodology that begins with a high-level overview of a system and
progressively breaks it down into smaller, more manageable components or subsystems. This
approach emphasizes the overall structure and functionality before delving into the details.
Characteristics
48
• Hierarchical Structure: The design starts with the main goal or function and divides it into sub-
tasks.
• Decomposition: Each sub-task is further refined until it becomes simple enough to implement.
• Modularity: Encourages the creation of independent modules that can be developed and tested
separately.
Benefits
• Easier to manage complex systems by breaking them into smaller parts.
• Facilitates parallel development, allowing multiple teams to work on different modules
simultaneously.
• Enhances clarity and understanding of the overall system structure.
2. Bottom-Up Design
Bottom-up design is an approach that starts with the detailed design of individual components or
modules and integrates them to form a complete system. This method focuses on building small,
functional parts that can be combined to create a larger system.
Characteristics
• Component Focus: Emphasizes the development of individual components before considering
their integration.
• Emergent Structure: The overall system structure emerges from the combination of these
components.
• Iterative Development: Often involves testing and refining components before they are
integrated.
Benefits
• Allows for the use of existing components or libraries, which can speed up development.
• Encourages innovation at the component level, as teams can experiment with different
implementations.
• Can be more flexible, as components can be modified or replaced without affecting the entire
system.
I. Data Design:
Data design is concerned with the structure, storage, and management of data within the system. It
defines how data is modeled, organized, and how relationships between data entities are established.
49
Key Activities:
In a Hospital Management System, data design involves defining entities such as Patient, Doctor,
Appointment, and MedicalRecord. The Patient entity might include attributes like PatientID,
Name, DateOfBirth, Address, and ContactInfo. The Doctor entity could have attributes like
DoctorID, Name, Specialization, and Department. Relationships between these entities are
essential—for instance, an Appointment entity might link Patient and Doctor entities, storing
information like AppointmentID, Date, Time, and Reason. To ensure data integrity and avoid
redundancy, normalization is applied, which might involve separating the Address and ContactInfo
into separate entities or tables. This well-structured data model allows for efficient querying, such as
retrieving a patient’s appointment history or a doctor’s schedule.
50
Architectural design is focused on the overall structure of the system, defining the high-level
components, their relationships, and how they interact. It provides a blueprint for the system's
infrastructure.
Key Activities:
Key Activities:
Example:
In the component-level design phase, we focus on breaking down the system into manageable and
well-defined components. Each component is responsible for specific functionalities and interacts
with other components to fulfill the system's requirements.
• User Management:
Manages user accounts and authentication.
Functions: Create accounts, login/logout, update user info.
• Book Catalog Management:
Handles the library's book catalog.
Functions: Add/update books, search, remove books.
• Borrowing Management:
Manages borrowing and returning of books.
52
Interaction of example:
User Registration and Login:
1. A new user creates an account with the User Management component.
2. The user logs in and is authenticated by the same component.
Search and Borrowing a Book:
1. The user searches for a book using the Book Catalog Management component.
2. The Borrowing Management component handles the book issuance.
Reserving a Book:
1. If a book is checked out, the Reservation Management component reserves it for the user.
2. When the book is returned, the Notification System alerts the user that the book is available.
Returning a Book:
1. The user returns a book via the Borrowing Management component.
2. If overdue, the Notification System sends a reminder before the return.
This design illustrates how the components of a Library Management System work together to
manage user interactions and book transactions.
53
UI design is about creating the visual and interactive aspects of the software that users interact with.
It focuses on usability, aesthetics, and the overall user experience.
Key Activities:
• Wireframing: Creating basic layouts of the user interface to visualize the structure and flow.
• Prototyping: Building interactive prototypes to simulate the user experience and gather
feedback.
• Visual Design: Designing the look and feel, including colors, typography, icons, and other
visual elements.
• Usability Testing: Evaluating the interface with real users to identify and address usability
issues.
• Accessibility: Ensuring the UI is accessible to users with disabilities, following standards
such as WCAG (Web Content Accessibility Guidelines).
4. Inheritance: A mechanism that allows a new class (subclass) to inherit attributes and
methods from an existing class (superclass), promoting code reusability.
5. Polymorphism: The ability to present the same interface for different underlying data types,
allowing methods to be used interchangeably.
Phases of OOAD
1. Object-Oriented Analysis (OOA)
• Purpose: To gather requirements and understand the problem domain by identifying the
objects involved and their interactions.
• Techniques:
• Use Case Modeling: Describes how users will interact with the system, outlining
various scenarios.
• Object Modeling: Identifies and defines the objects, their attributes, and
relationships.
• Dynamic Modeling: Represents how objects interact over time, often using state
diagrams.
2. Object-Oriented Design (OOD)
• Purpose: To refine the analysis model and define how the system will be implemented using
the identified objects and their interactions.
• Techniques:
• Class Diagrams: Visual representations of classes, their attributes, methods, and
relationships.
• Sequence Diagrams: Illustrate how objects interact in a particular scenario over time.
• Design Patterns: Reusable solutions to common design problems, such as Singleton,
Factory, and Observer patterns.
Benefits of OOAD
• Modularity: Encourages the creation of independent, reusable components that can be easily
maintained and updated.
• Abstraction: Simplifies complex systems by focusing on high-level interactions rather than
implementation details.
• Reusability: Promotes the reuse of existing classes and components, reducing development
time and effort.
• Improved Communication: Provides a common vocabulary and framework for developers
and stakeholders, facilitating better understanding and collaboration.
55
UML Diagrams
UML (Unified Modeling Language) diagrams are essential tools used in software engineering to
visualize, specify, construct, and document the artifacts of a software system. They provide a
standardized way to represent the design and architecture of software applications, making it easier
for stakeholders to understand complex systems.
Types of UML Diagrams
UML diagrams can be categorized into two main groups:
1. Structural Diagrams
2. Behavioral Diagrams.
56
Structural Diagrams
These diagrams represent the static aspects of a system, focusing on the components and their
relationships.
Key types include:
1. Class Diagram: Displays the classes in a system, their attributes, methods, and the
relationships among them. It is fundamental for object-oriented design and helps in
understanding the system's structure.
2. Object Diagram: Similar to class diagrams but shows instances of classes at a specific
moment, illustrating the relationships between these instances.
3. Component Diagram: Represents the organization and dependencies among software
components, focusing on how they interact and communicate.
4. Deployment Diagram: Illustrates the physical deployment of artifacts on hardware nodes,
showing how software components are distributed across the system.
5. Package Diagram: Organizes classes and other UML elements into packages, showing
dependencies between them.
6. Composite Structure Diagram: Details the internal structure of a class and its interactions
with other parts of the system.
Behavioral Diagrams
These diagrams capture the dynamic aspects of a system, emphasizing the interactions and behaviors
of components. Key types include:
1. Use Case Diagram: Models the functionality of a system from the user's perspective,
showing actors and their interactions with use cases.
2. Activity Diagram: Represents workflows and processes, illustrating the flow of control from
one activity to another.
57
3. Sequence Diagram: Describes how objects interact in a particular scenario, focusing on the
order of message exchanges over time.
4. State Machine Diagram: Models the states of an object and transitions between those states
based on events.
5. Communication Diagram: Similar to sequence diagrams but focuses on the relationships
between objects and the messages they exchange.
6. Timing Diagram: Shows how objects interact over time, emphasizing the timing of
messages and events.
7. Interaction Overview Diagram: Combines activity and sequence diagrams to model the
flow of interactions across multiple scenarios.
Purpose and Benefits of UML Diagrams
• Visualization: They provide a clear visual representation of system architecture and design,
making complex systems easier to understand.
• Documentation: UML diagrams serve as documentation for software systems, aiding in
maintenance and future development.
• Communication: They facilitate communication among stakeholders, including developers,
architects, and non-technical team members.
• Analysis: UML diagrams help in analyzing system requirements and identifying potential
issues early in the development process.
UML diagrams are pivotal in modern software development, providing a comprehensive framework
for modeling and understanding software systems effectively.
The system boundary defines the scope of the system being modeled. It visually distinguishes what is
inside the system (use cases) from what is outside (actors). The boundary is often represented by a
rectangle that encloses the use cases.
4. Relationships:
Relationships between actors and use cases are depicted using lines. Common types of relationships
include:
• Association: A direct interaction between an actor and a use case.
• Include: Indicates that a use case includes the behavior of another use case.
• Extend: Indicates that a use case can extend the behavior of another use case under certain
conditions.
Purpose of Use Case Modeling
• Functional Requirements: Use case modeling helps capture the functional requirements of a
system by detailing how users will interact with it.
• Visualization: It provides a visual representation of system functionality, making it easier for
stakeholders to understand the system's behavior.
• Communication Tool: Use case diagrams facilitate discussions between stakeholders,
developers, and designers, ensuring a shared understanding of requirements.
• Requirement Analysis: During the requirements analysis phase, use cases help identify and
clarify user requirements, documenting various interactions with the system.
Creating Use Case Diagrams
1. Identify Actors: Determine the external entities that will interact with the system.
2. Define Use Cases: Identify the key functionalities that the system must provide to fulfill the
actors' goals.
3. Establish Relationships: Draw lines to connect actors with their corresponding use cases,
indicating how they interact.
4. Draw the System Boundary: Enclose the use cases within a rectangle to represent the
system's scope.
Example of a Use Case Diagram
For an online shopping system, the use case diagram might include:
• Actors: Customer, Admin
• Use Cases:
• Place Order
• Track Order
• Update Product Information
59
• Relationships:
• The Customer actor is associated with the "Place Order" and "Track Order" use cases.
• The admin actor is associated with the "Update Product Information" use case.
Benefits of Use Case Modeling
• Clear Understanding: Provides a clear understanding of user interactions and system
functionalities.
• Improved Requirements Gathering: Aids in gathering and documenting requirements
effectively.
• Facilitates Testing: Use cases can serve as a basis for developing test cases, ensuring that all
functionalities are covered.
• Supports Agile Development: Use case modeling aligns well with agile methodologies by
focusing on user needs and iterative development.
In summary, use case modeling is a vital technique in software development that helps define
functional requirements, visualize interactions, and improve communication among stakeholders. By
capturing the essential aspects of user interactions with the system, it lays the groundwork for
successful system design and implementation.
• Rational Rose supported the Unified Modeling Language (UML) for object-oriented analysis
and design.
• It facilitated round-trip engineering, allowing conversion between models and code in both
directions.
• The tool integrated with IDEs like Microsoft Visual Studio.NET and IBM Rational
Application Developer.
User Interface
The Rational Rose interface consisted of several key components:
1. Menu bar: Contained menus like File, Edit, View, etc. with various options.
2. Toolbar: Provided shortcuts for frequently used actions.
3. Browser Window: Displayed different views (Use Case, Logical, Component, Deployment)
containing diagrams.
4. Diagram Toolbar: Provided symbols for the current diagram type.
5. Diagram Window: The main area for drawing diagrams using the toolbar symbols.
6. Log Window: Showed error messages, warnings, and information.
7. Documentation Window: Displayed documentation related to symbols and other aspects.
Views and Modeling
Rational Rose supported four main views for modeling software systems:
1. Use Case View: Contained diagrams used in analysis, such as use case, sequence, and
collaboration diagrams.
2. Logical View: Included class diagrams and state transition diagrams used in object design.
3. Component View: Depicted diagrams used in system design, such as component diagrams.
4. Deployment View: Illustrated how the completed system would be physically deployed
across different machines.
Use Case Modeling in Rational Rose is a method to capture and illustrate the functional
requirements of a system by showing interactions between users (actors) and the system to achieve
specific goals.
Key Components
• Actors: External entities interacting with the system (users, systems, hardware).
• Use Cases: Specific functionalities or processes provided by the system.
• System Boundary: Defines what is inside the system (use cases) and what is outside (actors).
61
1. Launch Rational Rose: Open the application and create a new model.
2. Select Use Case View: In the Browser Window, choose the "Use Case View" for your
diagram.
3. Create Use Case Diagram: Rename the default diagram and open the drawing area.
4. Add Actors: Use the toolbar to add and label actors (e.g., "Customer").
5. Define Use Cases: Drag and label use case symbols (e.g., "Place Order").
6. Establish Relationships: Draw lines to connect actors with use cases to show interactions.
7. Documentation: Add descriptions by right-clicking elements and selecting "Specification."
8. Save and Review: Save the diagram and ensure accuracy.
Example
Benefits
Domain Model
Domain modeling is the tool used for constructing visualization of the objects, associations,
attributes, as well as dynamic features within a particular domain.It acts as a bridge between the real-
world domain and the system being developed, providing a clear understanding of the business
concepts and rules.
Key Concepts in Domain Modeling
1. Entities
Entities stand for the basic concepts or objects that cover the issue area. In most cases of word
history, they are nouns distinguished by the attributes they have. For instance, in a banking space, the
entities could relate to Customer, Account, Transaction, etc.
2. Relationships
Relationships imply the connections and interactions of persons, things, places, and events. They
determine which thing such as other people are subject to or with who they interact. Different types
of relationships generally fall into one-to-one, one-to-many, or many-to-many categories.
3. Attributes
62
Attributes are the characterization or description of entities. They give long descriptions outlining
objects and positions, and these are simply shown as data fields. Likewise, an instance of Customer
entity class may include properties such as the name, address, phone number, and so on.
4. Multiplicity:
Specifies how many instances of one entity can be associated with an instance of another entity.
Entities
Attributes
Relationships
Multiplicity
This simple domain model outlines how a customer interacts with the system by placing orders that
consist of various books.
Many-to-Many (M:M): Instances of one class can be associated with multiple instances of another
class and vice versa (e.g., Student enrolls in Courses).
Association Properties:
Role Names: Describes the role played by an object in the association (e.g., Buyer in the Customer-
Order association).
Navigability: Indicates the direction in which the association can be traversed.
Rational Rose is a widely used tool for modeling and designing systems using Unified Modeling
Language (UML). It enables developers to create both sequence diagrams and domain models, which
are crucial for understanding system behavior and structure. Here’s a brief guide on how to
implement these in Rational Rose:
Sequence Diagrams illustrate the flow of messages between objects in a system based on specific
use cases, showing the order of interactions.
Steps:
Example:
Domain Models represent the key business entities, their attributes, and the relationships between
them within a system, providing a conceptual view of the system’s structure.
Steps:
Example:
• Sequence Diagrams validate the dynamic interactions between the objects defined in the
Domain Model.
• The Domain Model provides a static view of the system’s structure, while sequence
diagrams offer a dynamic view of how the system operates during specific use cases.
By leveraging Rational Rose, developers can effectively design both the interactions (sequence
diagrams) and the structure (domain models) of a system, ensuring a robust foundation for software
implementation.
Interaction Diagrams
Interaction Diagrams are a type of UML diagram that illustrate how objects in a system interact with
each other to achieve a specific goal. The two main types of Interaction Diagrams are
i. Sequence Diagrams
ii. Collaboration Diagrams.
I. Sequence Diagrams
A Sequence Diagram is an interaction diagram that shows how objects communicate with each other
in a specific sequence of events. It emphasizes the order of messages exchanged between objects.
Key Components:
Lifelines: Represent individual objects or roles that interact during the scenario. A lifeline is
depicted as a vertical dashed line.
67
Key Components:
Objects: Represented as rectangles, objects are the participants in the interaction.
Multiple Objects: Representation of multiple instances of a class involved in the interaction.
Actor: External entities that interact with objects in the system.
Links: Lines connecting objects, representing associations or relationships between them.
Messages: Arrows on the links that indicate the messages sent from one object to another. The order
of messages is typically denoted by numbering.
Return Messages: Responses or return values from a method call, indicating that the processing of a
message is complete.
Purpose:
• To visualize the structural relationships between objects.
• To show how objects collaborate by sending and receiving messages.
• To depict the interaction among objects in the context of a particular use case or operation.
Use Cases:
• Designing the collaboration of objects for a specific functionality.
• Understanding the object organization in a system.
• Analyzing the distribution of responsibilities among objects.
69
Example:
Sequence and Collaboration Diagrams complement each other. Sequence Diagrams emphasize the
order of interactions, while Collaboration Diagrams highlight the relationships between objects.
Using both diagrams in Rational Rose provides a comprehensive understanding of the system’s
dynamic behavior and object organization.
6. Interfaces and Abstract Classes: Use interfaces or abstract classes to define common
behavior shared by multiple classes, enforcing consistency and enabling polymorphism.
Techniques for Mapping Classes to Code
1. Identify Classes: Begin by identifying the classes from the design. Classes typically
correspond to nouns in the problem domain.
2. Define Properties: For each class, define its properties or attributes and map them to data
types in the chosen programming language.
3. Define Methods: Determine the behaviors of each class and define method signatures based
on the class's responsibilities.
4. Use of Collections: Implement one-to-many relationships using collection classes (e.g.,
ArrayList in Java) to manage groups of related objects.
5. Code Generation Tools: Utilize tools that automate the code generation process from design
models, reducing manual effort and minimizing discrepancies.
Best Practices
• Maintain Consistency: Ensure that the code accurately reflects the design by keeping design
artifacts consistent with the implemented codebase.
• Follow Design Principles: Adhere to object-oriented design principles, such as SOLID
principles, to create maintainable and scalable code.
• Testability: Design classes with testability in mind, favoring small, focused classes that are
easier to test in isolation.
• Readability and Maintainability: Write code that is easy to read, understand, and maintain,
following coding standards, naming conventions, and documentation practices.
By following these techniques and best practices, developers can effectively map design artifacts,
such as class diagrams and interaction diagrams, into well-structured and maintainable code,
ensuring consistency between the design and implementation.
• User Satisfaction: Ensure that the software meets user requirements and provides a positive user
experience, ultimately leading to customer satisfaction.
Types of testing
1. Functional testing : It is a type of software testing that validates the software systems against the
functional requirements. It is performed to check whether the application is working as per the
software’s functional requirements or not. Various types of functional testing are Unit testing,
Integration testing, System testing, Smoke testing, and so on.
2. Non-functional testing : It is a type of software testing that checks the application for non-
functional requirements like performance, scalability, portability, stress, etc. Various types of
non-functional testing are Performance testing, Stress testing, Usability Testing, and so on.
3. Maintenance testing :
It is the process of changing, modifying, and updating the software to keep up with the customer’s
needs. It involves regression testing that verifies that recent changes to the code have not adversely
affected other previously working parts of the software.
Apart from the above classification software testing can be further divided into 2 more ways of
testing:
1. Manual testing :
It includes testing software manually, i.e., without using any automation tool or script. In this type,
the tester takes over the role of an end-user and tests the software to identify any unexpected
behavior or bug. There are different stages for manual testing such as unit testing, integration testing,
system testing, and user acceptance testing. Testers use test plans, test cases, or test scenarios to test
software to ensure the completeness of testing. Manual testing also includes exploratory testing, as
testers explore the software to identify errors in it.
74
2. Automation testing
It is also known as Test Automation, is when the tester writes scripts and uses another software to
test the product. This process involves the automation of a manual process. Automation Testing is
used to re-run the test scenarios quickly and repeatedly, that were performed manually in manual
testing.
Steps in Software Testing
1. Verification and Validation
• Verification: Ensures that the software meets the specified requirements and is built
correctly.
• Validation: Confirms that the software fulfills its intended purpose and meets user needs.
2. Testing Levels
Software testing can be categorized into various levels:
• Unit Testing: Tests individual components or units of code for correctness.
• Integration Testing: Tests the interaction between integrated components to identify issues
in their interactions.
• System Testing: Tests the complete and integrated software system to verify that it meets
specified requirements.
• Acceptance Testing: Evaluates the system’s readiness for delivery to users and checks if it
meets business requirements.
Types of Software Testing Techniques
1. Black box Testing : Testing in which the tester doesn’t have access to the source code of the
software and is conducted at the software interface without any concern with the internal logical
structure of the software known as black-box testing.
2. White box Testing : Testing in which the tester is aware of the internal workings of the product,
has access to its source code, and is conducted by making sure that all internal operations are
performed according to the specifications is known as white box testing.
3. Grey Box Testing : Testing in which the testers should have knowledge of implementation,
however, they need not be experts.
Importance of Software Testing
• Quality Assurance: Ensures that the software is of high quality, functions as expected, and is
free of critical bugs.
• Cost Efficiency: Identifying and fixing issues early in the development process reduces the
cost of later-stage fixes.
• Risk Mitigation: Helps in identifying potential risks and vulnerabilities in the software,
ensuring security and reliability.
• Reputation Management: Delivering high-quality software enhances the reputation of the
organization and builds trust with users.
75
Design Patterns
Software design patterns are reusable solutions to common problems that arise during software
development. They are templates for solving recurring design issues and provide a way to create
flexible, scalable, and maintainable software systems.
Key Characteristics of Design Patterns
• Reusability: Patterns can be applied to different projects and problems, saving time and
effort in solving similar issues.
• Standardization: They provide a shared language and understanding among developers,
facilitating communication and collaboration.
• Efficiency: By using established patterns, developers can avoid reinventing the wheel,
leading to faster and more reliable development.
• Flexibility: Patterns are abstract solutions that can be adapted to fit various contexts and
requirements.
Why Learn Design Patterns?
There are several reasons to learn design patterns:
1. Improve Code Quality: Design patterns help in creating code that is easier to understand,
maintain, and extend. They promote best practices and provide solutions that have been
tested and proven effective.
2. Enhance Problem-Solving Skills: Learning design patterns equips developers with a book
of standard solutions to common problems. This enables them to quickly and effectively
address similar challenges in various projects.
3. Promote Reusability and Efficiency: By applying design patterns, developers can create
reusable components that can be used across multiple projects. This reduces redundancy and
saves development time.
4. Learn from Expert’s Explanation: Design patterns are derived from the collective
experience of skilled developers and architects. Learning these patterns allows developers to
benefit from the wisdom and insights of industry experts.
Creational Patterns:
Creational Design Pattern abstract the instantiation process. They help in making a system
independent of how its objects are created, composed and represented.
76
• Singleton: Ensures a class has only one instance and provides a global point of access.
• Factory Method: Creates objects without specifying the exact class of object that will be
created.
• Abstract Factory: Provides an interface for creating families of related or dependent objects.
• Builder: Separates the construction of a complex object from its representation.
• Prototype: Creates new objects by copying an existing object.
Structural Patterns:
Structural Design Patterns are concerned with how classes and objects are composed to form larger
structures. Structural class patterns use inheritance to compose interfaces or implementations.
• Observer: Defines a dependency between objects so that when one object changes state, all
its dependents are notified.
• Strategy: Defines a family of algorithms, encapsulates each one, and makes them
interchangeable.
• Command: Encapsulates a request as an object, allowing parameterization of clients with
queues, requests, and operations.
• Chain of Responsibility: Passes a request along a chain of handlers.
• Mediator: Defines an object that encapsulates how a set of objects interact.
• Memento: Captures and externalizes an object's internal state without violating
encapsulation.
• State: Allows an object to alter its behavior when its internal state changes.
• Template Method: Defines the skeleton of an algorithm, allowing subclasses to override
specific steps.
• Visitor: Defines a new operation without changing the classes of the elements on which it
operates.
processes, standards, and best practices to ensure the consistent quality of the software product. The
key aspects of QA include:
1. Process Definition: Establishing and maintaining well-defined processes for software
development and testing.
2. Quality Planning: Defining quality objectives, metrics, and standards for the project.
3. Quality Control: Monitoring and evaluating the software development process to ensure
compliance with quality standards.
4. Continuous Improvement: Analyzing quality data and implementing corrective actions to
improve the development process.
Software Evolution
The process of developing a software product using software engineering principles and methods is
referred to as Software Evolution. This includes the initial development of software and its
maintenance and updates, till desired software product is developed, which satisfies the expected
requirements.
Evolution starts from the requirement gathering process. After which developers create a prototype
of the intended software and show it to the users to get their feedback at the early stage of the
software product development. The users suggest changes, on which several consecutive updates and
maintenance keep on changing too. This process changes to the original software, till the desired
software is accomplished.
Even after the user has the desired software in hand, the advancing technology and the changing
requirements force the software product to change accordingly. Re-creating software from scratch
and to go one-on-one with the requirement is
79
not feasible. The only feasible and economical solution is to update the existing software so that it
matches the latest requirements.
Software Evolution Laws
Lehman has given laws for software evolution. He divided the software into three different
categories:
1. Static-type (S-type) - This is a software, which works strictly according to defined specifications
and solutions. The solution and the method to achieve it, both are immediately understood before
coding. The s-type software is least subjected to changes hence this is the simplest of all. For
example, calculator program for mathematical computation.
2. Practical-type (P-type) - This is a software with a collection of procedures. This is defined by
exactly what procedures can do. In this software, the specifications can be described but the solution
is not obviously instant. For example, gaming software.
3. Embedded-type (E-type) - This software works closely as the requirement of real-world
environment. This software has a high degree of evolution as there are various changes in laws, taxes
etc. in the real-world situations. For example, Online trading software.
E-Type software evolution
Lehman has given eight laws for E-Type software evolution -
1. Continuing change - An E-type software system must continue to adapt
to the real-world changes, else it becomes progressively less useful.
2. Increasing complexity - As an E-type software system evolves, its
complexity tends to increase unless work is done to maintain or reduce it.
3. Conservation of familiarity - The familiarity with the software or the knowledge about how it
was developed, why was it developed in that particular manner etc., must be retained at any cost, to
implement the changes in the system.
4. Continuing growth- In order for an E-type system intended to resolve some business problem, its
size of implementing the changes grows according to the lifestyle changes of the business.
5. Reducing quality - An E-type software system declines in quality unless rigorously maintained
and adapted to a changing operational environment.
6. Feedback systems- The E-type software systems constitute multi-loop, multi-level feedback
systems and must be treated as such to be successfully
modified or improved.
7. Self-regulation - E-type system evolution processes are self-regulating
with the distribution of product and process measures close to normal.
8. Organizational stability - The average effective global activity rate in an
evolving E-type system is invariant over the lifetime of the product.
80
• On-Time Delivery: Ensuring that the software is delivered to the customer within the agreed
timeframe.
• Budget Management: Keeping the overall costs of the project within the allocated budget.
• Customer Satisfaction: Delivering software that meets the customer's expectations and
requirements.
• Team Cohesion: Maintaining a well-functioning and coherent development team throughout the
project.
• Intangible Product: Unlike physical engineering products, software cannot be seen or touched.
Progress is often difficult to gauge without relying on reports and evidence from the development
team.
• Uniqueness of Large Projects: Every large software project is unique, making it difficult to
apply previous experience directly. Rapid technological changes can also render previous lessons
obsolete.
• Variability of Processes: Software development processes vary widely across organizations,
making it hard to predict when and where problems might arise.
Effective software project management involves several critical activities that ensure the project
stays on track and meets its objectives. These core activities include:
1. Proposal Writing
Early in the project lifecycle, proposal writing is crucial for winning contracts. A well-written
proposal outlines the project objectives, estimated schedule, budget, and reasons why the project
should be awarded to a specific team or organization.
Successful proposal writing helps secure the necessary contracts and funding to initiate and sustain
the project.
2. Project Planning
81
Project planning involves creating a detailed project plan that outlines the scope, estimates, schedule,
and task assignments for the team. It also includes supervising the work to ensure it adheres to the
planned time and budget constraints.
Proper planning sets a clear roadmap for the project, helping to manage resources efficiently and
keep the project aligned with its goals.
3. Risk Management
Project managers must assess potential risks that could impact the project, continuously monitor
these risks, and take proactive actions to address any issues that arise.
By managing risks effectively, project managers can prevent or minimize potential setbacks,
ensuring smoother project execution.
4. People Management
This involves selecting the right team members and establishing ways of working that enhance team
performance and collaboration. Managing people also includes resolving conflicts and maintaining
team morale.
Effective people management leads to a motivated and productive team, which is essential for
achieving project success.
5. Reporting
Project managers must regularly report on the project's progress to both customers and internal
management. This requires clear and concise communication of technical details, progress, and any
issues that need attention.
Regular and effective reporting keeps stakeholders informed and helps in making timely decisions to
keep the project on track.
6. Post-Project Evaluation
After the project is completed, conducting a post-project evaluation helps in identifying what went
well and what didn’t. This can provide valuable insights for future projects. Proper documentation of
the project outcomes, challenges, and lessons learned can serve as a reference for future projects and
continuous improvement.
Project Planning
Project planning is the process of defining a project's scope, goals, and deliverables, as well as identifying the
resources and tasks needed to achieve them. It involves creating a detailed plan that outlines the steps required
to complete the project successfully.
Key Components of Project Planning
82
Defining project goals and objectives: Setting specific, measurable, achievable, relevant, and time-bound
(SMART) goals and milestones.
Developing the project plan: Creating a work breakdown structure, schedule, and budget. This includes:
Work breakdown structure: Detailing the tasks that need to be completed.
Schedule: Outlining the timeline for the project.
Budget: Identifying the resources required and costs associated with the project.
Identifying project risks: Making a plan for potential risks and creating contingency plans.
Creating a communication plan: Determining who needs to be updated on the project's progress and how
often.
Assigning tasks and resources: Allocating tasks to team members and ensuring they have the necessary
resources.
Benefits of Project Planning
• Helps ensure projects are completed on time, within budget, and to the required standard.
• Facilitates effective communication between all members of a project team.
• Helps identify potential risks and issues at an early stage.
• Helps communicate the vision and objectives to the team.
• Keeps everyone focused on the goal.
Project Planning Tools
Gantt charts: Horizontal bar charts that show tasks, their order, and expected duration.
Risk registers: Charts that list risks, their probability, potential impact, risk level, and mitigation plans.
Project management software: Tools that help track and manage projects from start to finish, enabling
prioritization, organization, timeline creation, progress tracking, and data-driven reporting.
Project planning is an iterative process, and the project plan may need to be adjusted as the project
progresses. Regular review and updates are crucial to ensure the project stays on track and meets its
objectives.
83
Configuration Management
Configuration management (CM) involves managing and controlling the various components of a
software system throughout its lifecycle. It ensures that the software's functionality and performance
remain consistent as it evolves.
Key Objectives of Configuration Management
• Consistency: Ensure that systems perform as expected by maintaining a consistent configuration
across environments (development, testing, production).
• Change Control: Manage changes to configurations in a controlled manner to prevent
unauthorized modifications and configuration drift.
• Documentation: Maintain accurate documentation of configuration items, their attributes, and
interdependencies to facilitate troubleshooting and audits.
• Monitoring: Continuously assess the state of configurations to identify deviations from the
desired state and implement corrective actions.