๐ Lecture 1 โ Introduction to Software Engineering
๐ Overview: This lecture introduces Software Engineering as a discipline, explaining what software truly is, why it matters, and how it differs from other engineered systems. It covers the origins of software engineering from the software crisis, defines the field through authoritative sources, and discusses the challenges of balancing conflicting requirements in software development.
๐๏ธ Topics Covered
The lecture begins by defining software beyond just code to include data and documentation. It then explores why software is critically important across business, science, games, and embedded systems. The distinction between computer science and software engineering is clarified through the lens of engineering as applied science. Key differences between software and physical systems are examined, including the fact that software does not wear out and the inherent complexity due to constant change. The software crisis of the 1960s is presented as the catalyst for software engineering. Formal definitions from IEEE and Ian Somerville are provided, followed by characteristics of well-engineered software and the balancing act between cost, reliability, efficiency, and user-friendliness. The law of diminishing returns is introduced, along with an overview of major software development activities.
๐ Lecture Summary
1.1 Introduction
Software engineering is about learning how to develop good software using examples and case studies. Before understanding software engineering, we must first understand what software actually is.
What is Software? When we write a program for a computer, we call it software. However, software is not just a program; it includes several components:
- Program: The code itself is definitely included.
- Data: The data on which the program operates is also considered part of the software.
- Documentation: All related documents are also considered part of the software.
So software is not just code written in Cobol, Java, Fortran, or C++. It also includes data and all documentation.
Why is it important? Software plays a vital role in all fields of life today:
- Business decision-making: Software helps analyze data and make business decisions accurately and easily.
- Modern scientific investigation and engineering problem solving: Software enables intensive calculations and data analysis, such as DNA decoding in bioinformatics and astronomical observations.
- Games: Computer games that interest people of all ages are driven by software.
- Embedded systems: Microcontrollers in cars, televisions, and microwave ovens are controlled through software.
Software is also central to education, office automation, and Internet applications. Billions and trillions of dollars are invested in this field worldwide every year.
Engineering: The process of productive use of scientific knowledge is called engineering.
1.2 Difference between Computer Science and Software Engineering
Engineering is defined as "the science concerned with putting scientific knowledge to practical use." Various engineering fields like electrical, mechanical, and civil engineering are based on physics. Physics itself is not engineering, but using physics to make buildings, electronic devices, and machines is engineering. Similarly, computer science relates to software engineering as physics relates to other engineering fields.
๐ Definition โ Software Engineering: "This is the process of utilizing our knowledge of computer science in effective production of software systems."
Difference between Software and Other Systems: The major thing that distinguishes a software system from other systems is that software does not wear out! Non-software systems like cars, TVs, or electric bulbs can malfunction due to wear and tear over time. They have a particular life after which they may not perform as expected. Software is not affected by this phenomenon. If a software has a defect (called a bug), that defect exists from the very first day. You cannot remove a bug by simply replacing a faulty part with a new oneโgetting a new CD will not fix it. This is a fundamental difference between software and other systems.
๐ก Why this matters: Understanding that software does not wear out means that all defects are design-time errors, not time-based degradation. This shifts the focus to getting the design right from the start.
1.3 Source of Inherent Complexity of Software
Non-software systems like cars have very infrequent and minor changes between modelsโa slight body shape change or a new gadget, but rarely a fundamental engine change. In contrast, software companies constantly make fundamental changes to their systemsโenhancements, interface changes, or entirely new systems. Changes happen in many different dimensions and with high frequency. This high frequency of change is a major reason for increased bugs in software. If a car manufacturer released fundamentally changed cars every six months without proper testing, those cars would also have lots of bugs. Therefore, one major reason for complexity in software is that software passes through a constant process of evolution. The name of the game is change and evolution all the time in all dimensions.
1.4 Software Crisis
What is Software Crisis? In the early 1950s, computers were primitive and software use was limited. By the 1960s, rapid hardware improvements made computers far more powerful, leading to more complex software. The tools and techniques used for less complex software became inapplicable. This is like a person who built a hut being asked to build a concrete building using the same methodsโit would not work. In the early 1960s, software suffered from a similar problem called the Software Crisis. Using old tools and techniques for large systems resulted in:
- Projects were not complete in most cases
- Delivered too late
- Over-budgeted
- Systems were not reliableโthey could not do what they were expected to do
A conference was held in 1960 where the term "software crisis" was introduced. The major issue was that software development was in crisis and we had not been able to handle its complexities. The term Software Engineering was also coined in that same conference. People realized that just coding is not enoughโengineering principles must be applied to software development.
1.5 Software Engineering
Software Engineering as defined by IEEE: The Institute of Electrical and Electronic Engineers (IEEE) defines software engineering as: "The application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software; that is, the application of engineering to software."
Another definition by Ian Somerville: "All aspects of software production. Software engineering is not just concerned with the technical processes of software development but also with activities such as software project management and with the development of tools, methods and theories to support software production."
Software Engineering is the combination of all tools, techniques, and processes used in software production, including:
- Programming Language
- Programming Language Design
- Software Design Techniques
- Tools
- Testing
- Maintenance
- Development
Programming language design is a major success in software engineeringโfor example, the design of Ada language was a considerable effort. Object-oriented programming requires languages that support object-orientation to implement object-oriented designs.
Well-Engineered Software: Characteristics include:
- Provides the required functionality
- Maintainable
- Reliable
- Efficient
- User-friendly
- Cost-effective
Every company can build software with unlimited resources, but well-engineered software conforms to all these characteristics. Software has a close relationship with economicsโengineering systems always require economic feasibility analysis. The major challenge for a software engineer is to build software within limited time and budget in a cost-effective way with good quality.
The Balancing Act! Software Engineering is a balancing act. There are always trade-offs between conflicting requirements:
- Cost vs. Efficiency
- Cost vs. Reliability
- Efficiency vs. User-interface
A software engineer must analyze which feature is more important and strike a balance. For example, in a cruise missile or nuclear reactor controller, performance and reliability are far more important than cost-effectiveness and user-friendliness. The Chernobyl accident illustrates what happens when software does not react within a certain time. The art of good balance comes from experience.
Law of Diminishing Returns: When you dissolve sugar in water, sweetness increases gradually, but at a saturation point, no more sugar dissolves. Similarly, in software engineering, when you invest in improving quality, initially a little money yields high improvement. But after reaching a certain level of quality, the return on investment becomes reducedโless than the effort or money invested. Therefore, after a reasonable level of quality, we usually do not try to improve further.
Software Background: Caper Jones, a renowned researcher, analyzed around 10,000 software projects through his company Software Productivity Research. He divided software activities into about 25 categories; nine major ones include:
- Project Management
- Requirement Engineering
- Design
- Coding
- Testing
- Software Quality Assurance
- Software Configuration Management
- Software Integration
- Rest of the activities
No single activity is dominantโcoding is only about 13-14% of the whole effort of software development.
Excerpt from "No Silver Bullet" โ Fred Brooks: In the eye of an unsophisticated manager, software is like a giant that sometimes reveals as unscheduled delay or cost overrun. Managers look for magical solutions, but magic is not a reality. The only solution is to follow a disciplined approach to build software. Software Engineering is nothing but a disciplined and systematic approach to software development.
1.6 Summary
Today we discussed: what software engineering is, why it is important, what software crisis is, how software engineering derived from software crisis, the importance of engineering principles, the balancing act and how it applies, the law of diminishing returns, and the major activities involved in software development.
โญ Key Takeaways
Software engineering is a disciplined, systematic, and quantifiable approach to developing, operating, and maintaining softwareโit is not just coding. The software crisis of the 1960s revealed that old techniques were inadequate for complex systems, leading to the birth of software engineering as a formal discipline. Software is fundamentally different from physical systems because it never wears out, but its constant evolution introduces inherent complexity and defects. A software engineer must balance conflicting requirements like cost, reliability, efficiency, and user-friendliness, recognizing the law of diminishing returns on investment. Most critically, coding represents only about 13-14% of total software development effort, with other activities like requirements engineering, design, and testing consuming the majority.
๐ง Quick Revision Questions
- What are the three main components that constitute software, according to this lecture?
- Why is it incorrect to say that a software program "wears out" over time like a physical machine?
- What was the "software crisis" and what event formally recognized it and coined the term "software engineering"?
- According to the IEEE definition, what does software engineering involve beyond just writing code?
- What is the "law of diminishing returns" as applied to software engineering, and what practical implication does it have for quality improvement?
๐ Lecture 02 โ Introduction to Software Development
๐ Overview: This lecture introduces the fundamental concepts of software development as a disciplined engineering process. It distinguishes between construction and management activities, presents a software engineering framework centered on quality, describes the software development loop, and outlines the four basic phases of software engineering, emphasizing the critical importance of maintenance.
๐๏ธ Topics Covered
The lecture covers the division of software development into construction (requirements, design, coding, testing) and management (planning, configuration management, quality assurance, installation/training) activities. It presents a Software Engineering Framework with four components: quality focus, processes, methods, and tools. It describes the Software Development Loop (problem definition, technical development, solution integration, status quo) and the six questions of software construction. Finally, it explains the four Software Engineering Phases: vision, definition, development, and maintenance, highlighting the disproportionate cost of maintenance.
๐ Lecture Summary
2.1 Software Development
Software development activities are broadly divided into two major categories: construction and management. Construction activities are those directly related to building the software, such as gathering requirements, developing design, coding, and testing. Management activities are umbrella activities that complement construction to ensure it proceeds smoothly and effectively, including project planning and management, configuration management, software quality assurance, and installation/training. Management activities surround and govern construction activities through processes and rules, as illustrated in Figure 1.
๐ Definition โ Construction Activities: Activities directly related to the development of software, e.g., requirement gathering, design development, coding, and testing. ๐ Definition โ Management Activities: Umbrella activities used to smoothly and successfully perform construction activities, e.g., project planning, configuration management, software quality assurance, and installation/training.
2.2 A Software Engineering Framework
Any engineering approach must be founded on an organizational commitment to quality. Based on this, a software engineering framework is proposed with four major components:
- Quality Focus: Demands that processes be defined for rational and timely development, with quality emphasized during execution.
- Processes: A set of key process areas (KPAs) for effectively managing and delivering quality software in a cost-effective manner. Processes define tasks, their order, deliverables, and milestones.
- Methods: Provide the technical "how-to's" to carry out tasks. There can be multiple techniques for a task, used in different situations.
- Tools: Provide automated or semi-automated support for software processes, methods, and quality control.
๐ Definition โ Software Engineering Framework: A structured approach to software development founded on organizational commitment to quality, comprising quality focus, processes, methods, and tools. ๐ก Why this matters: This framework provides a structured, layered approach ensuring that quality is built into the process from the top down, with methods and tools supporting defined processes.
2.3 Software Development Loop
Software development activities can be performed in a cyclic manner called the software development loop, which has four major stages:
- Problem Definition: Determine what problem the software will solve; completely comprehend the issues and requirements of the system.
- Technical Development: Find the solution on technical grounds and base the implementation on it; this is where the new system is actually developed.
- Solution Integration: Integrate any existing systems with which the new system must interact.
- Status Quo: The situation after the new system is successfully deployed at the user site. When new requirements emerge, the loop must be repeated.
Software Construction answers a sequence of six questions during development:
- What is the problem to be solved?
- What are the characteristics of the entity used to solve the problem?
- How will the entity be realized?
- How will the entity be constructed?
- What approach will uncover errors made in design and construction?
- How will the entity be supported over the long term (corrections, adaptations, enhancements)?
๐ Definition โ Software Development Loop: A cyclic model of software development consisting of problem definition, technical development, solution integration, and status quo, enabling evolution and integration.
2.4 Software Engineering Phases
There are four basic phases of software development:
- Vision: Determine why the system is being built and what business objectives to achieve.
- Definition: Realize or automate the vision; determine the activities and things involved.
- Development: Determine the design, implementation, and testing of the system.
- Maintenance: Control change in the system, whether enhancements or defect removal. This is a very important phase as for most large, long-lifetime systems, maintenance cost normally exceeds development cost by factors ranging from 2 to 3. A pathological case (Boehm, 1975) for an avionics system had development cost of $30 per line of code but maintenance cost of $4000 per instruction.
๐ Formula: Maintenance Cost vs. Development Cost โ For large, long-lifetime systems, maintenance cost is typically 2 to 3 times the development cost. ๐ Example: An avionics system had a development cost of $30 per line of code but a maintenance cost of $4000 per instruction, illustrating the potential extreme disparity.
โญ Key Takeaways
Software development is a multi-activity process that goes far beyond coding, requiring both construction activities (requirements, design, coding, testing) and management activities (planning, quality assurance, configuration management). The software engineering framework emphasizes that quality focus is the foundation, supported by processes, methods, and tools. The software development loop highlights the cyclic nature of development, where after status quo is reached, new requirements can restart the cycle. Finally, the four software engineering phasesโvision, definition, development, and maintenanceโshow that maintenance is a critical, often dominant, cost phase, typically costing 2-3 times the initial development.
๐ง Quick Revision Questions
- What are the two major categories of software development activities, and how do they relate to each other?
- List the four major components of the Software Engineering Framework and explain the role of each.
- What are the four stages of the Software Development Loop, and what happens after the Status Quo stage?
- Name the four phases of software engineering and describe the primary activity in each phase.
- According to the lecture, how does the cost of maintenance typically compare to the cost of development for large, long-lifetime systems? Provide the specific example and numbers given.
๐ Lecture 3 โ Requirement Engineering
๐ Overview: This lecture introduces the fundamental concept of requirement engineering as the critical "definition phase" of software development. It establishes why understanding and documenting what a system should do is the most important step in building successful software, highlighting the severe cost implications of getting requirements wrong.
๐๏ธ Topics Covered
The lecture begins by positioning requirement engineering within the software development lifecycle, specifically as the "definition phase" that transitions from "why" to "what." It then provides several formal definitions of software requirements from different experts, establishes the critical importance of requirements by citing defect statistics and cost-to-fix data, and finally explains the central role the requirements document plays in all subsequent development and management activities.
๐ Lecture Summary
3.1 Requirement Engineering
Software development is a multi-activity process that answers questions about the problem, the solution's characteristics, its realization, construction, error detection, and long-term support. These questions shape the 4 distinct phases of the software development life cycle: vision (why), definition (what), development (how to build), and maintenance (changes and enhancements). Requirement engineering deals with the definition phase, focusing on establishing system services and constraints. It is the starting point of development where the focus is on what needs to be built, not how to build it.
๐ Definition โ Software Requirements (Jones): A statement of needs by a user that triggers the development of a program or system. ๐ Definition โ Software Requirements (Alan Davis): A user need or necessary feature, function, or attribute of a system that can be sensed from a position external to that system. ๐ Definition โ Software Requirements (Ian Sommerville): A specification of what should be implemented; descriptions of how the system should behave, or of a system property or attribute; may be a constraint on the development process. ๐ Definition โ Software Requirements (IEEE):
- A condition or capability needed by a user to solve a problem or achieve an objective.
- A condition or capability that must be met or possessed by a system to satisfy a contract, standard, or specification.
- A documented representation of a condition or capability.
๐ก Why this matters: While definitions vary slightly, they all converge on the same core idea: a software requirement is a document describing all services provided by the system and the constraints under which it must operate.
3.2 Importance of Requirements
Many problems in software development are traced back to shortcomings in the requirement gathering and documentation process. 40-60% of all defects found in software projects can be traced back to poor requirements. Fred Brooks, in his book "The Mythical Man Month," emphasizes that the hardest single part of building a software system is deciding precisely what to build, and no other part cripples the system as much if done wrong. Using a house-building analogy, adding a room late in construction is vastly more difficult and costly than changing the blueprint early on.
๐ Cost-to-Fix Principle: Correcting an error after development costs significantly more than fixing it earlier. Boehm (1981) reported this cost ratio as 68 times more; other studies suggest it can be as high as 200 times. ๐ก Why this matters: This cost relationship makes sound requirements the most critical success factor for any project, as cost is directly tied to project success or failure.
3.3 Role of Requirements
The software requirements document plays a central role in the entire development process. In the project planning and feasibility phase, it is needed to determine the time and resources required to build the software, potentially leading to scope reduction. During the construction process, it serves as the base reference for designing and coding the software. Other activities like user documentation and testing also need this document for their deliverables. The project manager uses it to monitor and track progress and to change project scope through the change control process.
๐ Definition โ Change Control Process: The formal process for modifying the requirements document to change the scope of a project.
โญ Key Takeaways
This lecture establishes requirement engineering as the most critical phase in software development. You must remember that it addresses the "what" of a system, not the "how," and that its primary output is the software requirements document. The most sobering fact is that 40-60% of all defects originate from poor requirements, and fixing these defects after development costs 68 to 200 times more than fixing them during the requirement phase. The requirements document serves as the central reference for project planning, design, coding, testing, and project management, making its accuracy and completeness vital to project success.
๐ง Quick Revision Questions
- In which phase of the software development lifecycle does requirement engineering primarily operate, and what is its core focus?
- List the four distinct phases of software development mentioned at the start of this lecture.
- According to the lecture, what percentage of all defects found in software projects can be traced back to poor requirements?
- What is the estimated cost ratio for fixing an error after development versus during the requirements phase, according to Boehm (1981)?
- What are the four different roles or activities that depend on the software requirements document as a central reference?
๐ Lecture 4 โ Requirement Engineering-2
๐ Overview: This lecture examines the critical risks associated with inadequate requirements processes, including user dissatisfaction, budget overruns, and product failure. It then defines the different levels of software requirementsโbusiness, user, functional, and non-functionalโexplains stakeholder roles, and details the characteristics of high-quality requirement statement and specification documents.
๐๏ธ Topics Covered
The lecture begins by detailing six major risks from an inadequate requirement process: insufficient user involvement, creeping requirements, ambiguous requirements, gold-plating, minimal specifications, and incomplete requirements. It then introduces the four levels of software requirements (business, user, functional, and non-functional) with detailed examples, explains the crucial role of stakeholders, and contrasts the requirement statement document with the requirement specification document, listing the necessary characteristics for each.
๐ Lecture Summary
3.4 Some Risks from Inadequate Requirement Process
Requirements play the most significant role in software development, and the success or failure of a system depends largely on the quality of requirement documents. The lecture lists six key risks:
-
Insufficient user involvement leads to unacceptable products. If input from different types of users is not taken, the output lacks key functional areas, resulting in an unacceptable product. Overlooking the needs of certain user classes (stakeholders) leads to customer dissatisfaction.
-
Creeping user requirements contribute to overruns and degrade product quality. Requirement creep is one of the most significant factors in budget and time overruns, meaning identifying and adding new requirements at advanced stages of development.
-
Ambiguous requirements lead to ill-spent time and rework. Ambiguity means two different readers interpret the same requirement differently, arising from the imprecise nature of natural language. For example, the Urdu phrase โRooko mut jane dooโ can mean either โdonโt let him goโ or โlet him goโ depending on comma placement.
-
Gold-plating by developers and users adds unnecessary features. Gold-plating refers to features not in the original requirement document that the developer adds anyway, thinking they would add value, but resulting in schedule and budget overruns.
-
Minimal specifications lead to missing key requirements. For example, a requirement stated as โWe need a flow control and source control engineering toolโ resulted in a system with no print functionality, making it unusable. The example of a requirement stating average water level for a particular sensor does not specify how the system should respond if we try to calculate beyond the past six months.
๐ Definition โ Requirement Creep: identifying and adding new requirements to the list at some advanced stages of the software development process.
๐ Definition โ Ambiguity: two different readers of the same document interpret the requirement differently.
๐ Definition โ Gold-plating: features that are not present in the original requirement document and are not important for the end-user but the developer adds them anyway.
- Incompletely defined requirements make accurate project planning and tracking impossible.
๐ก Why this matters: These risks directly cause project failures, budget overruns, and user dissatisfaction, making proper requirement engineering critical for success.
Levels of Software Requirements
Software requirements are defined at various levels of detail and granularity. Requirements at different levels serve different purposes.
-
Business Requirements: These state the high-level business objective of the organization or customer requesting the system. They document main system features and functionalities without going into nitty-gritty details, captured in a document describing the project vision and scope.
-
User Requirements: These add further detail to business requirements, written from a userโs perspective. They describe tasks the user must be able to accomplish to fulfill business requirements, captured in the requirement definition document.
-
Functional Requirements: The next level of detail brings in the systemโs view and defines from the systemโs perspective the software functionality developers must build into the product to enable users to accomplish their tasks.
-
Non-Functional Requirements: These describe constraints under which the system must operate, including external system interfaces, design and implementation constraints, quality and performance attributes, regulations, standards, and contracts. Non-functional requirements dictate how the system architecture and framework are built.
๐ Definition โ Non-Functional Requirements: constraints that are placed on the choices available to the developer for design and construction of the software product.
๐ก Why this matters: All functional requirements must derive from user requirements, which must align with business requirements. During requirement engineering, focus on what and not howโrequirements must not include design or implementation details.
Example: Word-Processing System with Spell Checker
To understand the difference between requirement types:
- Business requirement: User will be able to correct spelling errors in a document efficiently. Spell checker will be included as a feature.
- User requirement: Finding spelling errors in the document and decide whether to replace each misspelled word with one chosen from a list of suggested words.
- Functional requirement: The spell checker will find and highlight misspelled words, display a dialog box with suggested replacements, allow selection from the list, replace the misspelled word with the selected word, and allow global replacements.
- Non-functional requirement: It must be integrated into the existing word-processor that runs on windows platform.
Stakeholders
Stakeholders are different people who would be interested in the software. Management carries weight but is usually not actual users. Ignoring needs of any user class may result in system failure. Stakeholders tend to state requirements in general and vague terms, trivialize things, have sometimes conflicting requirements, and internal politics may influence requirements.
A study of over 8300 projects revealed the top two reasons for project failure are lack of user input and incomplete requirements.
๐ Definition โ Stakeholders: different people who would be interested in the software.
Requirement Statement and Requirement Specification Documents
Different levels of software requirements are documented in different documents. The two main documents are Requirement Statement (also called Requirement Definition) which documents user requirements, and Requirement Specification (also called Functional Specification) which documents functional requirements.
Requirement Statement Characteristics:
- Complete - Each requirement must fully describe the functionality to be delivered.
- Correct - Each requirement must accurately describe the functionality to be built.
- Feasible - It must be possible to implement each requirement within known capabilities and limitations.
- Necessary - Each requirement should document something the customer really needs or is required for conformance.
- Prioritized - An implementation priority must be assigned to each requirement.
- Unambiguous - All readers should arrive at a single, consistent interpretation.
- Verifiable - Users should be able to devise tests to determine proper implementation.
Requirement Specification Characteristics:
- Complete - No requirement or necessary information should be missing.
- Consistent - No requirement should conflict with other software or higher-level system or business requirements. Example: "All programs must be written in Ada" conflicted with "The program must fit in the memory of the embedded micro-controller" because Ada generated code was too large. Another example: "System must monitor all temperatures" conflicted with "System should only monitor temperatures below -20ยฐC and above 400ยฐC."
- Modifiable - One must be able to revise the SRS when necessary and maintain a history of changes.
- Traceable - One should be able to link each requirement to its origin, design elements, source code, and test cases.
Mixed Level of Abstraction
All requirements in a requirement document must be stated at a uniform level of abstraction. Differences in detail falsely imply relative importance and misguide development. Example violation:
- "The purpose of the system is to track the stock in a warehouse."
- "When a loading clerk types in the withdraw command he or she will communicate the order number, the identity of the item to be removed, and the quantity removed. The system will respond with a confirmation that the removal is allowable."
โญ Key Takeaways
- An inadequate requirements process introduces six critical risks: insufficient user involvement, creeping requirements, ambiguous requirements, gold-plating, minimal specifications, and incomplete requirementsโall leading to project failure and budget overruns.
- Software requirements exist at four distinct levels: business requirements (high-level objectives), user requirements (user tasks), functional requirements (system functionality), and non-functional requirements (constraints and quality attributes)โeach documented in separate documents.
- Stakeholders are all people interested in the software; ignoring any user class can cause system failure, and the top reasons for project failure are lack of user input and incomplete requirements.
- A good requirement statement must be complete, correct, feasible, necessary, prioritized, unambiguous, and verifiable; a good requirement specification must be complete, consistent, modifiable, and traceable.
- Requirements must be written at a uniform level of abstraction to avoid misleading relative importance, and the focus must remain on what to build, not how to build it.
๐ง Quick Revision Questions
- What are the six risks from an inadequate requirement process, and how does each impact software development?
- Explain the difference between business requirements, user requirements, functional requirements, and non-functional requirements using the spell checker example.
- What is the difference between a Requirement Statement document and a Requirement Specification document, and what are the key characteristics of each?
- Why is consistency important in a requirement specification? Provide two examples of conflicting requirements from the lecture.
- What does "mixed level of abstraction" mean, and why is it a problem in requirement documents?
๐ Lecture 5 โ Relationship of Several Components of Software Requirements
๐ Overview: This lecture explores the intricate relationships between various documents produced during the requirements engineering phase, focusing on how business requirements from different stakeholders can conflict and must be resolved. It introduces essential tools like the Vision Statement, Context Diagram, and Use Case Modeling for structuring and communicating software requirements effectively, emphasizing the need for domain understanding.
๐๏ธ Topics Covered
The lecture begins by examining Business Requirements and their potential conflicts among developers, retailers, and customers. It then covers the Vision Statement as a balanced guiding document, followed by Assumptions and Dependencies, Scope and initial release planning. The Context Diagram is introduced to graphically define system boundaries. Finally, the Use Case Model and its componentsโActors and Use Casesโare explained as a key tool for capturing functional requirements and fostering the Customer-Developer Relationship.
๐ Lecture Summary
Relationship of Several components of Software Requirements
The lecture's core concept is the interconnected relationship between different documents produced during the requirements engineering phase. The provided figure illustrates how business requirements, the vision statement, scope, assumptions, and context diagrams all relate to each other. Conflicting goals from different stakeholders, such as a developer wanting high-tech features, a retailer wanting simple solutions, and a customer wanting convenience, must be resolved before detailing software requirements. Business requirements can also be used to set implementation priorities; for instance, a requirement to maximize revenue would prioritize features that directly drive sales.
๐ Definition โ Business Requirements: High-level objectives of the organization that requests or builds a system. These can often conflict, as seen with the kiosk example where the developer, retailer, and customer have different goals. These conflicts must be resolved before detailing software requirements.
๐ Example: For a kiosk product, the developer's business requirements include leasing the kiosk and selling consumables, while the retailer's include making money from customer use. A conflict arises because the developer wants a high-tech solution, while the retailer wants a simple one. These must be balanced to create a successful product.
The Vision Statement
The Vision Statement reflects a balanced view that satisfies the needs of diverse customers. It should be somewhat idealistic but grounded in realities like existing customer markets, enterprise architectures, organizational strategic directions, and resource limitations. It provides a high-level goal for the project.
๐ Example: The vision statement for the Chemical Tracking System states it will allow scientists to request chemicals, track their location and history, save 25% on chemical costs, and generate compliance reports for government regulations.
Assumptions and Dependencies
All assumptions made when conceiving the project must be recorded. These are factors believed to be true but not yet confirmed.
๐ Example: For the Chemical Tracking System, the management sponsor assumed it would replace the existing chemical stockroom inventory system and interface with the appropriate purchasing department applications.
Scope
Project scope defines the concept and range of the proposed solution, while limitations identify capabilities the product will not include. Clarifying scope helps establish realistic stakeholder expectations. Requirements that are out of scope must be rejected unless they are so beneficial that the scope should be enlarged (with accompanying budget, schedule, and staff changes). It is important to keep a record of rejected requirements as they tend to reappear.
Scope and Initial Release: The major features for the initial release should be summarized, along with the quality characteristics that will provide the intended benefits. Requirements must be prioritized and a release schedule created.
The Context Diagram
The Context Diagram graphically illustrates the boundary between the system and the outside world. It identifies external entities (terminators) and the flow of data and material between each entity and the system. It is used as the top-level abstraction in a dataflow diagram and can be included in the vision and scope document or the SRS.
๐ Definition โ Context Diagram: A graphical diagram that identifies the entities outside the system that interface with it and shows the flow of data and material between these external entities and the system itself.
๐ Example: The context diagram for the Chemical Tracking System shows external entities like "Scientist," "Chemical Stockroom," "Vendor," "Purchasing Department," "System Administrator," and "Government" interacting with the central system.
Use Case Model Components
A software engineer is typically hired to solve a domain problem, not a computer science one. To improve communication with the client, the engineer should learn domain-related terminology and use it in documenting requirements. The use case model is a tool for organizing and structuring requirements. It was developed by Ivar Jacobson and is now part of the Unified Modeling Language (UML) . It captures the discussion between developer and customer and is intuitive, even for those unfamiliar with UML.
๐ Definition โ Use Case: Specifies a complete functionality from its initiation by an actor until it has performed the requested functionality. ๐ Definition โ Actor: An entity (human, device, or system) that has an interest in interacting with the system.
The use case model:
- Represents a use case view of the system (how it is used).
- Treats the system as a black box, only depicting the external interface.
- Describes functional requirements from the end-user's perspective.
- Gives a clear description of what the system should do for the developer.
- Provides a basis for system testing and tracing functional requirements into actual classes and operations.
Use Cases and Customer-Developer Relationship
Excellent software products result from effective communication and coordination between developers and customers. To build this relationship and capture requirements properly, the requirement engineer must learn about the business that is to be automated. ๐ก Why this matters: Without a strong customer-developer relationship, requirements can be misunderstood, leading to project failure.
๐ Definition โ Customer-Developer Relationship: A successful software project requires effective communication and coordination between developers and customers. The requirement engineer must learn the business domain to properly capture requirements.
โญ Key Takeaways
This lecture highlights that software requirements engineering is a complex, multi-document process. The key for a software engineer is to master tools for resolving conflicts (like the Vision Statement), defining boundaries (like the Context Diagram), and capturing interactions (like Use Case Modeling). Critically, success hinges not on technical prowess alone but on building a strong customer-developer relationship through domain understanding and effective communication. Remember to document everything, including assumptions and out-of-scope requirements, to manage stakeholder expectations and prevent future misunderstandings. The Use Case Model is a powerful, intuitive tool for this, and mastering its componentsโActors and Use Casesโis essential for any software professional.
๐ง Quick Revision Questions
- What three parties' conflicting requirements are highlighted in the business requirements section for the kiosk product, and what is the key to resolving their tension?
- What is the purpose of a Vision Statement, and what must it be balanced against?
- According to the lecture, why is it important to keep a record of rejected requirements?
- What is the primary purpose of a Context Diagram, and what does it graphically establish?
- What are the two main components of a Use Case Model, and what does each specify?