Unit1 - Subjective Questions
CSE320 • Practice Questions with Detailed Answers
Define Software Engineering according to IEEE. Explain the major differences between Software Engineering and traditional Computer Science.
Definition:
According to IEEE Standard 610.12, Software Engineering is defined 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."
Differences between Software Engineering and Computer Science:
| Feature | Computer Science | Software Engineering |
|---|---|---|
| Focus | Focuses on the theoretical foundations of computation and algorithms. | Focuses on the practical application of engineering principles to build software systems. |
| Goal | To find absolute truths and optimal solutions (e.g., complexity). | To build reliable, efficient, and maintainable software products within budget and time. |
| Nature | Abstract and mathematical. | Concrete and pragmatic. |
| Outcome | Algorithms, theories, and proofs. | Working software systems and documentation. |
Explain the concept of the 'Software Crisis'. What were the contributing factors that led to the evolution of Software Engineering?
The Software Crisis refers to a period in the late 1960s and 1970s characterized by difficulties in writing high-quality and efficient computer software within the allocated time and budget.
Contributing Factors:
- Projects over budget: Costs often spiraled out of control ().
- Projects running over time: Deadlines were frequently missed.
- Low Quality: Software was unreliable, inefficient, and bug-ridden.
- Unmaintainable Code: Lack of documentation and structure made modification impossible (Spaghetti code).
- Hardware Evolution: Hardware power increased rapidly (Moore's Law), but software techniques could not keep up with the complexity required to utilize that power.
Impact:
This crisis led to the 1968 NATO conference where the term "Software Engineering" was coined to introduce disciplined engineering approaches to software development.
Describe the generic phases of the Software Development Life Cycle (SDLC).
The Software Development Life Cycle (SDLC) provides a framework for the software creation process. The generic phases include:
- Requirement Gathering & Analysis:
- Collecting inputs from stakeholders.
- Defining functional and non-functional requirements.
- Output: SRS (Software Requirement Specification).
- Feasibility Study:
- Analyzing technical, operational, and economic feasibility.
- Design:
- High-Level Design (HLD): Architecture, database design.
- Low-Level Design (LLD): Algorithms, API definitions.
- Implementation (Coding):
- Writing the actual code using programming languages.
- Testing:
- Verifying that the software meets requirements and is bug-free (Unit, Integration, System testing).
- Deployment:
- Releasing the software to the production environment.
- Maintenance:
- Corrective (bug fixes), Adaptive (environment changes), and Perfective (enhancements) maintenance.
Explain the Classical Waterfall Model with a diagram. What are its major advantages and disadvantages?
Waterfall Model:
It is a linear-sequential life cycle model where progress is seen as flowing steadily downwards (like a waterfall) through phases.
Process:
Requirements Analysis Design Coding Testing Maintenance.
Advantages:
- Simple to understand: Easy to manage due to the rigidity of the model.
- Milestones: Each phase has specific deliverables and a review process.
- Good for stable requirements: Works well when requirements are well-known and fixed.
Disadvantages:
- No Feedback Loop: It is difficult to go back and change something once a phase is finished.
- Late Testing: Testing is done only at the end. If a design error is found in the testing phase, the cost of fixing it is very high ().
- Not suitable for complex projects: Cannot handle changing requirements or high uncertainty.
Distinguish between the Prototyping Model and the Waterfall Model.
Comparison:
| Feature | Waterfall Model | Prototyping Model |
|---|---|---|
| Process Flow | Linear and sequential. | Iterative (Build Feedback Refine). |
| User Involvement | Low; user interacts primarily at the beginning (requirements) and end. | High; user interacts throughout the development of the prototype. |
| Requirements | Must be frozen before development starts. | Can be vague initially; refined via the prototype. |
| Cost of Error | High, if errors are detected late. | Lower, as errors are detected early in the prototype. |
| Suitability | Suitable for well-defined, stable projects. | Suitable for projects with unclear requirements or new technology. |
Explain the Spiral Model. Why is it known as a 'Meta-Model' and how does it handle risk?
Spiral Model:
The Spiral model combines elements of design and prototyping-in-stages, in an effort to combine advantages of top-down and bottom-up concepts. It is visually represented as a spiral with many loops.
The Four Quadrants:
- Objective Setting: Determine objectives, alternatives, and constraints.
- Risk Analysis: Analyze alternatives and identify/resolve risks. Prototypes are often built here.
- Development & Validation: Develop the product for this iteration (design, code, test).
- Planning: Review results and plan for the next iteration (spiral).
Risk Handling:
It is the only traditional model driven by risk analysis. Before any coding takes place in a loop, risks (technical, schedule, cost) are assessed. If risks are too high, the project might be terminated.
Meta-Model:
It is called a Meta-Model because it subsumes other models. For example, a single loop might resemble the Waterfall model, while the risk analysis phase utilizes Prototyping.
Describe the V-Model (Verification and Validation Model). How does the testing phase map to the development phase?
V-Model:
An extension of the Waterfall model where process steps are bent upwards after the coding phase, forming a V shape. It emphasizes that for every development phase, there is a corresponding testing phase.
Mapping of Phases:
- Requirement Analysis Acceptance Testing: Checks if the software meets customer needs.
- System Design System Testing: Checks the entire system architecture and functionality.
- Architectural Design Integration Testing: Checks if different modules work together.
- Module Design Unit Testing: Checks individual components or functions.
Key Benefit: Testing planning begins early in the life cycle (during the design phase), not just after coding.
What is the Agile Manifesto? Explain its four core values.
Agile Manifesto:
A declaration created in 2001 by software practitioners to improve software development processes. It prioritizes flexibility and customer satisfaction.
Four Core Values:
- Individuals and interactions over processes and tools.
- Significance: People drive development, not rigid rules.
- Working software over comprehensive documentation.
- Significance: Deliver functional code rather than extensive manuals.
- Customer collaboration over contract negotiation.
- Significance: Continuous feedback is better than fixed contracts.
- Responding to change over following a plan.
- Significance: Adaptability is crucial in dynamic environments.
Explain the Scrum framework. Detail the roles, artifacts, and events involved.
Scrum:
A lightweight Agile framework for developing complex software systems using iterative and incremental practices.
1. Roles:
- Product Owner: Defines features, prioritizes the Product Backlog, represents stakeholders.
- Scrum Master: Facilitates the process, removes impediments, ensures Scrum rules are followed.
- Development Team: Cross-functional group that designs, builds, and tests the increment.
2. Artifacts:
- Product Backlog: Ordered list of everything that is known to be needed in the product.
- Sprint Backlog: List of tasks selected for the current Sprint.
- Increment: The sum of all Product Backlog items completed during a Sprint.
3. Events:
- Sprint: A time-boxed period (usually 2-4 weeks) to create an increment.
- Daily Stand-up: 15-minute meeting to synchronize activities.
- Sprint Review: Inspecting the outcome of the Sprint.
- Sprint Retrospective: Reviewing the process to improve for the next Sprint.
What is DevOps? Explain the DevOps lifecycle phases.
DevOps:
A set of practices that combines software development (Dev) and IT operations (Ops). It aims to shorten the systems development life cycle and provide continuous delivery with high software quality.
DevOps Lifecycle (Continuous Loop):
- Plan: Define business value and requirements.
- Code: Software construction and code review.
- Build: Compiling code and packaging artifacts.
- Test: Automated testing to ensure quality.
- Release: Managing release coordination.
- Deploy: Provisioning infrastructure and deploying code.
- Operate: Managing the software in production.
- Monitor: Collecting data on performance and user experience.
This is often represented as an infinity symbol indicating continuous integration and continuous deployment (CI/CD).
Compare Agile Methodology with the Traditional Waterfall Model.
Comparison:
| Aspect | Waterfall | Agile |
|---|---|---|
| Structure | Sequential (Step-by-step). | Iterative and Incremental. |
| Flexibility | Rigid; difficult to change requirements. | Flexible; welcomes change even late in development. |
| Delivery | Single delivery at the end of the project. | Continuous delivery of working software (Sprints). |
| Customer Involvement | Low; mostly at the beginning. | High; continuous feedback loop. |
| Team Coordination | Defined roles, often hierarchical. | Self-organizing, cross-functional teams. |
| Project Size | Good for small/medium projects with fixed requirements. | Good for complex projects with dynamic requirements. |
Define Functional Requirements and Non-Functional Requirements. Give two examples of each.
Functional Requirements (FR):
These define what the system should do. They describe the functions, behaviors, and services the system provides.
- Example 1: The system must allow a user to register with an email and password.
- Example 2: The system must calculate the total tax using the formula .
Non-Functional Requirements (NFR):
These define how the system performs. They are quality constraints or quality attributes.
- Example 1 (Performance): The system should load the dashboard in less than 2 seconds.
- Example 2 (Security): All user passwords must be encrypted using SHA-256.
Discuss various Requirement Gathering (Elicitation) techniques.
Requirement elicitation is the process of seeking, uncovering, acquiring, and elaborating requirements for computer systems. Common techniques include:
- Interviews:
- One-on-one meetings with stakeholders. Can be structured (pre-planned questions) or unstructured (open-ended).
- Brainstorming:
- Group sessions to generate new ideas and solutions rapidly without immediate criticism.
- Questionnaires/Surveys:
- Useful for gathering data from a large number of users remotely. Good for statistical data.
- Observation (Job Shadowing):
- Observing the user in their actual work environment to understand their workflow and pain points.
- Prototyping:
- Building a mock-up to show users. Helps in clarifying vague requirements.
- Use Cases / User Stories:
- Describing scenarios of how the user will interact with the system.
What is Feasibility Study in Requirement Analysis? Explain the different types of feasibility.
Feasibility Study:
An analysis conducted to determine if a proposed project is worth undertaking. It happens during the early stages of the SDLC.
Types of Feasibility:
- Technical Feasibility:
- Can we build it? Does the necessary technology, hardware, and expertise exist?
- Economic Feasibility:
- Is it profitable? Cost-Benefit Analysis ().
- Operational Feasibility:
- Will it work in the organization? Will users accept it?
- Legal Feasibility:
- Does it comply with laws (e.g., GDPR, copyright)?
- Schedule Feasibility:
- Can it be completed within the required timeframe?
What is an SRS (Software Requirements Specification) document? List the characteristics of a good SRS.
SRS Document:
A formal document that acts as a contract between the client and the developer. It completely describes the expected behavior of the software system.
Characteristics of a Good SRS:
- Correct: Accurately reflects the user's needs.
- Unambiguous: Every requirement has only one interpretation.
- Complete: Contains all significant requirements and responses to all inputs.
- Consistent: No conflicts between requirements (e.g., Req A says distinct inputs, Req B says overlapping inputs).
- Verifiable: There exists a method (test case) to verify if the requirement is met.
- Modifiable: Structure and style allow easy changes.
- Traceable: Origin of each requirement is clear (Forward and Backward traceability).
Outline the structure of an SRS document as per IEEE Std 830.
The IEEE Std 830 recommends the following structure for an SRS:
1. Introduction
- 1.1 Purpose
- 1.2 Scope
- 1.3 Definitions, acronyms, and abbreviations
- 1.4 References
- 1.5 Overview
2. Overall Description
- 2.1 Product perspective
- 2.2 Product functions
- 2.3 User characteristics
- 2.4 Constraints
- 2.5 Assumptions and dependencies
3. Specific Requirements (The core section)
- 3.1 External interface requirements
- 3.2 Functional requirements
- 3.3 Performance requirements
- 3.4 Design constraints
- 3.5 Software system attributes (Security, Maintainability)
4. Appendices
5. Index
Explain the process of Requirement Validation. Why is it necessary?
Requirement Validation:
The process of checking that the requirements defined in the SRS actually define the system that the customer wants. It ensures the requirements are complete, correct, and consistent.
Why is it necessary?
Errors in requirements are the most expensive to fix later in the lifecycle. Validation prevents "building the wrong product."
Techniques:
- Requirements Reviews: A team (including customers) manually analyzes the requirements.
- Prototyping: Demonstrating a model to the user for validation.
- Test-Case Generation: If a test case is difficult to derive, the requirement might be ambiguous.
- Automated Consistency Analysis: Using CASE tools to check for inconsistencies.
Using the Bathtub Curve, explain the difference between hardware failure and software failure.
Hardware Failure (Bathtub Curve):
Hardware follows a "Bathtub" curve:
- Infant Mortality: High failure rate initially due to manufacturing defects.
- Useful Life: Failure rate drops and remains constant/low.
- Wear Out: Failure rate rises sharply due to physical deterioration (rust, dust, heat).
Software Failure:
Software does not wear out. Its curve is different:
- Initial Phase: High failure rate (bugs found during testing/early release).
- Idealized Curve: Failure rate should drop to zero as bugs are fixed.
- Actual Curve: When changes/upgrades are introduced, the failure rate spikes again due to side effects, then slowly lowers. It does not rise due to time/physics, but due to complexity and change.
Explain the difference between Iterative and Incremental development strategies.
Incremental Development:
- Concept: The system is broken down into small, manageable pieces (increments). Each increment delivers a portion of the functionality.
- Analogy: Building a house room by room. You finish the kitchen, then the bedroom.
- Goal: To deliver parts of the working software early.
Iterative Development:
- Concept: The system is developed through repeated cycles (iterations). In each iteration, the system is improved and refined.
- Analogy: Sketching a whole picture, then inking it, then coloring it. You work on the whole, improving quality/detail.
- Goal: To refine the system based on feedback.
Note: Agile/Scrum is usually both Iterative (repeating cycles) and Incremental (delivering chunks of value).
What are the common challenges faced during Requirement Analysis?
Requirement Analysis is often the most difficult phase. Challenges include:
- Ambiguity: Stakeholders often speak in vague terms (e.g., "Make it user-friendly").
- Changing Requirements: Business needs change during the analysis process (Volatility).
- Communication Gap: Differences in vocabulary between technical developers and non-technical business users.
- Conflicting Requirements: Different stakeholders (e.g., Sales vs. Security team) may have opposing needs.
- Undocumented Processes: Users often rely on tacit knowledge that they forget to mention explicitly.
- Scope Creep: Uncontrolled expansion of project scope without adjustments to time, cost, and resources.