Unit-1
Unit-1
Definitions
Software Components
Software Engineering
Definition
Software Crisis
The term "software crisis" refers to the persistent difficulties and problems that have plagued
the software industry since the 1970s. Despite rapid advancements in computer hardware and
the explosive growth of the internet, issues with software development persist. These problems
include projects running late, exceeding budgets, and containing numerous faults. According
to an IBM report, 31% of projects are canceled before completion, 53% overrun their cost
estimates by an average of 189%, and for every 100 projects, there are 94 restarts.
Major Problems in the Software Industry
Historical Context
1. Y2K Problem
o Issue: The use of two-digit year formats (e.g., "64" for 1964) in software.
o Impact: As the year 2000 approached, this oversight caused widespread
concern and significant expenditures to correct the issue.
o Prevention: This problem was ultimately preventable with proper foresight and
planning.
2. Patriot Missile Failure
o Context: During the Gulf War, the U.S. "Patriot" missile defense system was
deployed.
o Issue: A timing error in the system's clock led to inaccuracies in tracking after
prolonged operation.
o Impact: The system failed to intercept Iraqi Scud missiles, resulting in
casualties.
3. Customer Database Failure (1996)
o Context: A U.S. consumer group attempted to replace its customer database.
oIssue: The new system malfunctioned on complex transactions despite being
delivered on time.
o Impact: This led to manual processing and a costly rebuild, highlighting the
pitfalls of over-optimistic project planning and deadline fixation.
4. Ariane-5 Rocket Failure
o Context: The Ariane-5 space rocket, developed at a cost of $7 billion over 10
years, failed shortly after launch.
o Issue: A software error occurred while converting data from a 64-bit to a 16-bit
format, resulting in an overflow error.
o Impact: The rocket was destroyed 39 seconds after launch, leading to the loss
of its payload of four expensive and uninsured scientific satellites.
Software Process
The software process refers to the structured set of activities required to produce software. This
process can vary significantly between organizations but generally includes stages such as
planning, analysis, design, implementation, testing, and maintenance. Effective software
processes are crucial for improving quality, productivity, and predictability in software
development.
Improving software processes helps organizations deliver higher quality products, enhance
productivity, and better meet deadlines and budget constraints. Many companies have reported
substantial improvements in their project management and software development capabilities
through process improvements.
Despite the benefits, many organizations struggle to achieve significant and lasting
improvements due to various obstacles:
Software Characteristics
Software exhibits several unique characteristics that differentiate it from other human-made
products. These characteristics have a significant impact on how software is developed,
maintained, and perceived.
Deliverables: These are the outputs produced during software development. Examples include
source code, user manuals, and operating procedure manuals.
Milestones: These are key events or checkpoints used to track the progress of a project.
Examples include the finalization of specifications and the completion of design
documentation. Milestones are essential for project planning and management.
Measure: Provides a quantitative indication of some attribute of a product or process (e.g., size,
capacity, efficiency, productivity, reliability).
Measurement: The act of evaluating a measure.
Metric: A quantitative measure that indicates the degree to which a system, component, or
process possesses a given attribute. For example, the average number of errors found per
review.
Process Metrics: Quantify attributes of the software development process and environment.
Examples include productivity, quality, failure rate, and efficiency.
Product Metrics: Measure attributes of the software product. Examples include size,
reliability, complexity, and functionality.
Productivity: Defined as the rate of output per unit of effort, typically measured in terms of
lines of code (LOC) produced per person month (PM).
Effort: Measured in person months (PM), indicating the amount of work done by a number of
persons over a specified period.
Module: Can be defined in various ways, such as a FORTRAN subroutine, an Ada package,
procedures and functions in PASCAL and C, C++ or Java classes, Java packages, or a work
assignment for an individual developer.
Software Component: Defined as an independently deliverable piece of functionality that
provides access to its services through interfaces. It is modular, deployable, and replaceable.
Generic Products: Developed for anonymous customers, targeting a broad audience with
many copies expected to be sold. Examples include operating systems, compilers, analyzers,
word processors, and CASE tools.
Customized Products: Developed for specific customers, tailored to their requirements. Most
software development projects (approximately 80%) fall into this category.
"The period of time that starts when a software product is conceived and ends when the product
is no longer available for use. The software life cycle typically includes a requirement phase,
design phase, implementation phase, test phase, installation and check-out phase, operation and
maintenance phase, and sometimes a retirement phase."
A software life cycle model, also known as a Software Development Life Cycle (SDLC), is an
abstraction that represents the software life cycle.
SDLC Models
Various life cycle models have been proposed based on the tasks involved in developing and
maintaining software. Some well-known life cycle models are discussed below.
In the Build and Fix model, a product is constructed without specifications or design. The
developer builds the product and reworks it as many times as necessary to satisfy the client.
This ad-hoc approach is simple and consists of two phases: write code and fix it. Fixing may
involve error correction or adding functionality.
Advantages:
Disadvantages:
Not suitable for larger projects as code becomes unmanageable and difficult to maintain.
Lack of design and structured development processes leads to high development and
maintenance costs.
No clear documentation, making future enhancements and error corrections challenging.
The Waterfall model is one of the most familiar and traditional models in software engineering.
It is named "Waterfall" because its diagrammatic representation resembles a cascade of
waterfalls, where each phase flows into the next.
1. Requirement Analysis and Specification Phase: The goal is to understand the exact
requirements of the customer and document them properly. This phase produces a
Software Requirement Specification (SRS) document, which acts as a contract between
the developer and customer.
2. Design Phase: The SRS document from the previous phase is used to transform
requirements into a structure suitable for implementation. The overall software
architecture is defined, and high-level and detailed design work is performed, resulting
in a Software Design Description (SDD) document.
3. Implementation and Unit Testing Phase: The design is implemented, and unit testing
is performed. Small modules are tested in isolation initially, and then integration testing
is performed to test the interaction between modules.
4. Integration and System Testing Phase: Integration testing ensures that modules work
together correctly, while system testing tests the entire system to build confidence
before delivery to the customer.
5. Operation and Maintenance Phase: This phase begins after software is delivered,
installed, and operational. It involves software maintenance tasks such as error
correction, enhancement of capabilities, and optimization to preserve the value of the
software over time.
Advantages:
1. Simplicity and Ease of Use: The Waterfall model is straightforward and easy to understand
and use. Each phase has specific deliverables and a review process.
2. Structured Approach: It enforces a disciplined approach where each phase has distinct goals
and deliverables.
3. Early Detection of Issues: Because requirements are specified early in the process, issues can
be identified and addressed early.
4. Clear Documentation: It produces a significant amount of documentation, which helps in
understanding and managing the project.
5. Project Management: The clear structure of phases makes it easier to plan and schedule
project activities and milestones.
Disadvantages:
1. Inflexibility to Change: Once a phase is completed, it is difficult to go back and make changes.
This model is not suitable for projects where requirements may evolve.
2. Late Testing: Testing is done late in the process, which means that significant issues may be
discovered late in the development cycle.
3. Late Working Product: A working version of the software is not available until the later
stages, which can delay the detection of issues and user feedback.
4. Poor for Long-Term Projects: For large and complex projects, the sequential nature of the
Waterfall model can lead to delays and increased costs.
5. Assumes Clear Requirements: It assumes that all requirements can be gathered at the
beginning, which is often not realistic in real-world projects.
3.Prototyping Model
The Prototyping Model is an alternative to the Waterfall Model designed to address some of
its shortcomings, particularly the late availability of working software. Instead of developing
the final software product right away, a working prototype is created to refine requirements
and specifications. This model involves iterative development and feedback from the customer,
helping to ensure that the final product meets their needs more accurately.
Steps Involved:
1. Requirements Gathering and Analysis: Initial requirements are gathered from the customer.
2. Quick Design: A preliminary design is created focusing on what will be visible to the user.
3. Prototype Development: A prototype is developed with limited functionality and performance.
4. Customer Evaluation: The customer evaluates the prototype, providing feedback.
5. Refinement of Requirements: Based on the feedback, requirements are refined, and the
prototype is iteratively improved.
6. Final Design and Implementation: Once the requirements are finalized, the prototype is
discarded, and the actual system is developed using a more structured approach, often similar
to the Waterfall Model.
Advantages:
1. Improved Requirement Gathering: The iterative process and customer feedback help in
refining and clarifying requirements.
2. Early Detection of Issues: Errors and issues can be identified and addressed early in the
development process.
3. Better User Involvement: Continuous user involvement ensures that the final product aligns
closely with user expectations.
4. Reduced Risk of Failure: The likelihood of the final product being rejected by the customer
is reduced as they have already evaluated and approved the prototype.
5. Flexibility: Changes can be incorporated based on customer feedback without significantly
impacting the project timeline or cost.
Disadvantages:
1. Extra Cost: Developing a prototype involves additional cost and effort, which may increase
the overall project budget.
2. Discarded Work: The prototype is usually discarded, leading to a perception of wasted effort.
3. Customer Misunderstanding: Customers might mistake the prototype for the final product,
leading to unrealistic expectations regarding performance and quality.
4. Not Always Feasible: Extensive customer involvement is required, which might not always be
possible or practical.
5. Potential for Scope Creep: Iterative feedback and refinement might lead to continuous
changes, potentially resulting in scope creep and delays.
Steps Involved:
1. Initial Requirements Analysis and Specification: Customers and developers gather and
document as many requirements as possible, producing an initial Software Requirements
Specification (SRS) document. Requirements are then prioritized.
2. Design, Implementation, and Testing: Based on the prioritized requirements, developers
design, implement, and test the software in multiple cycles. Each cycle results in a partial but
functional product.
3. Incremental Releases: At the end of each cycle, a working version of the software is released
to the customer. This version includes only a subset of the complete functionality, but it is
operational and can be used by the customer.
4. Customer Feedback and Refinement: After each release, feedback is gathered from the
customer to refine and prioritize the remaining requirements for the next cycle.
5. Repeat Cycles: Steps 2 to 4 are repeated until the complete product is developed and all
requirements are met.
Advantages:
1. Early Delivery of Functional Software: Customers receive a usable product early in the
development process, allowing them to perform useful work and provide feedback.
2. Improved Requirement Clarification: The iterative approach helps in refining requirements
and addressing any ambiguities early on.
3. Flexibility to Change: Changes in requirements or priorities can be easily accommodated in
subsequent cycles, making the model adaptable to evolving needs.
4. Reduced Risk: Early detection of issues and continuous customer involvement reduce the risk
of project failure.
5. Enhanced Customer Satisfaction: Regular delivery of functional increments ensures that
customer expectations are met progressively, enhancing satisfaction.
Disadvantages:
1. Frequent Planning and Management: Each cycle requires detailed planning, management,
and control, which can be time-consuming and resource-intensive.
2. Complexity in Integration: Continuous integration of new functionalities can lead to
integration challenges, especially in large and complex systems.
3. Potential for Incomplete Documentation: Frequent changes and iterations may lead to
incomplete or inconsistent documentation.
4. Scope Creep: The flexibility to accommodate changes might lead to scope creep, where new
requirements keep emerging, extending the project timeline and budget.
5. Customer Over-involvement: The model requires continuous customer involvement, which
may not always be feasible or practical.
The Evolutionary Development Model, like the Iterative Enhancement Model, operates in
cycles and involves the same phases as the Waterfall Model. However, it emphasizes
implementing requirements by category rather than by priority and does not necessarily
produce a usable product at the end of each cycle.
Steps Involved:
1. Initial Requirements Analysis and Specification: Gather and document the initial set of
requirements, producing a Software Requirements Specification (SRS) document.
Requirements are organized by categories.
2. Design, Implementation, and Testing in Cycles: Each cycle focuses on implementing a
specific category of requirements. For example, in a database application:
o One cycle might implement the graphical user interface (GUI).
o Another cycle might handle file manipulation.
o A subsequent cycle might manage queries.
o Another might cover updates.
3. Repeat Cycles Until Completion: This process is repeated, with each cycle focusing on a
different category, until all categories are implemented and integrated, resulting in a complete,
functional product.
4. Final Integration and Testing: After all cycles are completed, the integrated system undergoes
thorough testing to ensure all components work together seamlessly.
Advantages:
1. Suitable for Complex and Unclear Requirements: Ideal for projects with complex
requirements or where requirements are unstable or not well understood at the outset.
2. Facilitates Use of New Technologies: Effective for projects involving new or evolving
technologies, allowing incremental exploration and adaptation.
3. Flexible and Adaptable: The model's cyclical nature allows for adjustments based on new
insights and evolving requirements.
4. Focused Development: By addressing requirements by category, the model ensures a thorough
and focused development process for each component of the system.
Disadvantages:
1. Delayed Usability: No usable product is available until all cycles are completed, which can
delay the delivery of functional software to the customer.
2. Integration Complexity: Final integration of all categories can be challenging and may
introduce unforeseen issues that need to be resolved.
3. Extensive Planning and Management: Each cycle requires careful planning and coordination,
which can increase the complexity of project management.
4. Potential for Extended Development Time: The absence of early deliverables can lead to
extended development timelines, especially if requirements change significantly during the
project.
The Rapid Application Development (RAD) Model was proposed by IBM in the 1980s and
popularized by James Martin. This model emphasizes quick development and high user
involvement throughout the software development lifecycle. The process starts with the
construction of a rapid prototype, which is iteratively refined based on user feedback until the
requirements are finalized.
Advantages:
1. Quick Initial Feedback: Early delivery of rapid prototypes provides quick insights into the
product.
2. Reduced Development Time: Use of powerful development tools and reusable components
can significantly reduce development time.
3. Increased User Involvement: Continuous user participation ensures the product aligns with
user expectations and requirements.
4. Higher Acceptability: Active user involvement throughout the lifecycle increases the
likelihood of product acceptance.
Disadvantages:
1. Continuous User Involvement Required: The model is less effective if users cannot be
involved throughout the lifecycle.
2. Limited Effectiveness Without Reusable Components: Development time reduction is
minimal if reusable components are not available.
3. Need for Specialized Skills: Requires highly specialized and skilled developers, who may not
be readily available.
4. Challenges with Non-Modular Systems: May not be effective if the system cannot be
properly modularized.
7.Spiral Model
The Spiral Model, introduced by Barry Boehm in 1986, is designed to address the uncertainties
inherent in software projects by incorporating risk analysis and iterative refinement throughout
the development process. This model represents a series of cycles, each passing through four
main phases and gradually evolving the project.
Phases of the Spiral Model:
1. Planning Phase:
o Activities: Determine objectives, alternatives, and constraints for the upcoming cycle.
o Goal: Establish a clear plan and set goals for the next iteration.
2. Risk Analysis Phase:
o Activities: Analyze the identified alternatives, assess risks, and attempt to resolve
them.
o Goal: Mitigate risks early to prevent future problems and uncertainties.
3. Development Phase:
o Activities: Develop the next version of the product, which may involve design, coding,
and testing.
o Goal: Create a progressively refined version of the software product.
4. Assessment Phase:
o Activities: Conduct evaluations with stakeholders to gather feedback on the current
iteration.
o Goal: Ensure the product meets user expectations and make necessary adjustments for
the next cycle.
Each loop of the spiral represents one phase and consists of the four sectors mentioned above.
The model emphasizes iterative development and continuous stakeholder involvement, with
each cycle building upon the previous one.
Advantages:
1. Risk Management: Incorporates risk analysis and mitigation in each cycle, reducing the
likelihood of project failure.
2. Flexibility: Can accommodate changes and refinements at any stage of development.
3. Iterative Development: Allows for iterative refinement and continuous improvement of the
software.
4. Stakeholder Involvement: Involves stakeholders in every phase, ensuring that the product
meets their needs and expectations.
5. Adaptability: Can be adapted to include features of other life cycle models as needed.
Disadvantages:
1. Complexity: The model can be complex to implement due to its iterative nature and risk
analysis activities.
2. Resource Intensive: Requires significant expertise in risk assessment and management, which
may not be available in all teams.
3. Documentation and Planning: Requires detailed planning and extensive documentation at
each iteration.
4. Potential for Overhead: The continuous evaluation and iteration cycles can introduce
overhead, making the process time-consuming and potentially costly.
5. Flexibility Challenges: May provide more flexibility than required for many applications,
leading to potential inefficiencies.
1. Inception:
o Goal: Define the project scope and justify the project's purpose.
o Activities:
Identify key features and benefits for customers.
Determine methodology and assess risks.
Develop schedule and cost estimates.
2. Elaboration:
o Goal: Build a robust system architecture and address major risks.
o Activities:
Implement the majority of functional requirements.
Finalize the development methodology.
Mitigate significant risks.
3. Construction:
o Goal: Develop, integrate, and test the system.
o Activities:
Complete system architecture.
Perform development and testing.
Prepare final documentation for the client.
4. Transition:
o Goal: Deploy the system and refine it based on user feedback.
o Activities:
Conduct beta releases and iterations.
Address user-reported issues.
Improve and finalize the software.
Advantages:
1. Flexibility: Can adapt to changing requirements throughout the development process.
2. Risk Management: Early identification and mitigation of risks.
3. Incremental Delivery: Provides continuous, incremental deliveries of the product.
4. User Involvement: Active user participation ensures the software meets user expectations.
5. Component-Based: Promotes reusable and well-defined components, enhancing
maintainability.
Disadvantages:
1. Complexity: Can be complex to implement due to its comprehensive nature.
2. Resource Intensive: Requires skilled professionals and may involve significant resources.
3. Time-Consuming: Iterative cycles and extensive documentation can lead to longer
development times.
4. Suitability: May not be ideal for smaller projects due to its complexity and resource
requirements.
5. Dependency on Tools: Often relies on specialized tools for effective implementation, which
might not always be readily available.