12.1 Program Development Life cycle (3)
Resources |
Revision Questions |
Computer Science
Login to see all questions
Click on a question to view the answer
1.
Question 1
Describe the principles, benefits and drawbacks of both the Waterfall and Iterative software development life cycles. In your answer, consider the suitability of each model for different types of projects.
Waterfall Model:
Principles: The Waterfall model is a linear, sequential approach to software development. Each phase (Requirements, Design, Implementation, Verification, Maintenance) must be completed fully before the next phase can begin. There is no going back to previous phases. It emphasizes thorough documentation and a well-defined plan upfront.
Benefits:
- Simple and easy to understand: The linear nature makes it straightforward to manage.
- Well-defined stages: Clear milestones and deliverables at each stage.
- Suitable for projects with well-defined and stable requirements: When requirements are unlikely to change, the Waterfall model can be efficient.
- Easy to manage due to its structured approach.
Drawbacks:
- Inflexible: Difficult and costly to accommodate changes to requirements once a phase is complete.
- High risk: Errors in early stages can have significant consequences later on.
- Limited user involvement: User feedback is typically gathered only at the requirements stage.
- Not suitable for complex or evolving projects: Where requirements are likely to change, the Waterfall model is often not a good fit.
Iterative Model:
Principles: The Iterative model involves developing the software in cycles (iterations). Each iteration produces a working version of the software, which is then reviewed and refined. The cycle continues until the desired level of functionality is achieved. It allows for feedback and changes to be incorporated throughout the development process.
Benefits:
- More flexible: Easier to accommodate changes to requirements during development.
- Reduced risk: Problems are identified and addressed earlier in the process.
- Early user feedback: Users can provide feedback on working versions of the software.
- Suitable for complex or evolving projects: Where requirements are likely to change, the Iterative model is often preferred.
Drawbacks:
- Can be more complex to manage: Requires careful planning and coordination of iterations.
- Potential for scope creep: Changes to requirements can lead to uncontrolled expansion of the project.
- Requires strong communication and collaboration: Effective communication between developers and users is essential.
- May require more resources than Waterfall for smaller projects.
2.
Question 3
Consider the V-Model and the Unified Process. Describe the key stages in each model and discuss their strengths and weaknesses in relation to quality assurance and testing.
V-Model:
Stages: The V-Model is a verification-focused model. It consists of two parallel paths: a development path (requirements analysis, system design, implementation) and a verification path (system specification, system design, unit testing, integration testing, acceptance testing). Each development stage has a corresponding verification stage.
Strengths:
- Strong emphasis on quality assurance: Verification activities are closely aligned with development activities.
- Clear traceability: Requirements are traceable to design, code, and tests.
- Suitable for safety-critical systems: The rigorous verification process makes it suitable for systems where reliability is paramount.
Weaknesses:
- Inflexible: Difficult to accommodate changes to requirements once a stage is complete.
- Limited user involvement: User feedback is typically gathered only at the acceptance testing stage.
- Can be time-consuming: The rigorous verification process can be time-consuming.
Unified Process (UP):
Stages: The Unified Process is an iterative and incremental model. It consists of several phases: Inception, Elaboration, Construction, and Transition. Each phase involves multiple iterations, with each iteration producing a working version of the software.
Strengths:
- High level of flexibility: Easier to accommodate changes to requirements during development.
- Strong user involvement: Users are actively involved throughout the development process.
- Early and continuous testing: Testing is integrated into each iteration.
- Suitable for complex and evolving projects: The iterative nature makes it well-suited for projects where requirements are likely to change.
Weaknesses:
- Requires strong communication and collaboration: Effective communication between developers and users is essential.
- Can be complex to manage: Requires careful planning and coordination of iterations.
- Requires experienced developers: The iterative nature requires experienced developers who can adapt to changing requirements.
3.
Consider a scenario where a team is developing a system for a library to manage its book inventory. Describe the different types of testing that could be employed at various stages of the SDLC. For each type of testing, explain its purpose and provide an example of a test case.
Testing is a crucial part of the SDLC, ensuring the quality and reliability of the library inventory system. Different types of testing are applied at various stages to catch different kinds of errors.
Here's a breakdown of testing types and examples:
Testing Type | Purpose | Example Test Case |
Unit Testing | Verifies individual components (e.g., a function to check if a book is available) work correctly. | Test Case: Input: Book ID 123, Availability: True. Expected Output: True. Input: Book ID 456, Availability: False. Expected Output: False. |
Integration Testing | Verifies that different components (e.g., the book search module and the inventory database) work together correctly. | Test Case: Search for a book by ISBN. Verify that the search module correctly queries the database and returns the correct book details. |
System Testing | Tests the entire system to ensure it meets the specified requirements. | Test Case: Attempt to add a new book to the inventory. Verify that the book is successfully added to the database and the inventory count is updated. |
User Acceptance Testing (UAT) | Allows end-users (library staff) to test the system and ensure it meets their needs. | Test Case: Library staff member attempts to check out a book. Verify that the system allows the checkout process and updates the book's availability status. |
These tests are performed at different stages of the SDLC. Unit tests are typically performed during coding. Integration and system tests are performed after the system is integrated. UAT is performed before the system is released to production.