Learning Objectives
By the end of this lesson, you will be able to:
- Show understanding of the purpose of development life cycle
- Show understanding of analysis, design, coding, testing and maintenance stages in program development life cycle
- Show understanding of need for different development life cycles depending on program being developed
- Describe principles, benefits and drawbacks of each type of life cycle
- Compare and contrast the waterfall, iterative, and RAD models
- Apply appropriate development methodologies to different scenarios
Key Terms
Program Development Lifecycle
The process of developing a program set out in five stages: analysis, design, coding, testing and maintenance
Analysis
Part of program development lifecycle; a process of investigation, leading to specification of what a program is required to do
Design
Part of the program development lifecycle; uses the program specification from the analysis stage to show how the program should be developed
Coding
Part of program development lifecycle; writing of program or suite of programs
Testing
Part of the program development lifecycle; the testing of the program to make sure that it works under all conditions
Maintenance
Part of the program development lifecycle; the process of making sure that the program continues to work during use
Waterfall Model
A linear sequential program development cycle, in which each stage is completed before the next is begun
Iterative Model
A type of program development cycle in which a simple subset of requirements is developed, then expanded or enhanced, with the development cycle being repeated until the full system has been developed
Rapid Application Development (RAD)
A type of program development cycle in which different parts of requirements are developed in parallel, using prototyping to provide early user involvement in testing
Requirements Specification
A clear and precise definition of what the program needs to do, drawn up during the analysis stage
Syntax Error
A 'grammatical' error in which a program statement does not follow rules of the high-level language
Prototyping
Creating initial versions of software to show to customers for early feedback, used in RAD model
Purpose and Stages of Program Development Lifecycle
To develop a successful program that is going to be used by others to perform a specific task or solve a given problem, the development needs to be well ordered and clearly documented, so that it can be understood and used by other developers.
Program Development Lifecycle Timeline
The development process follows five main stages. Click on each stage to learn more about what happens:
1. Analysis
First step in solving a problem is to investigate issues and Current System if there is one. Problem needs to be defined clearly and precisely. A requirements specification is drawn up.
Key Activities:
- Investigate the problem
- Define requirements clearly
- Create requirements specification
- Plan solution approach (Top-down or Bottom-up)
2. Design
To design solution, an identifier table is a good starting point. This leads to thinking about data structures: do we need a 1D array or a 2D array to store data. Do we need a file to store data long-term?
Key Activities:
- Create identifier table
- Design data structures
- Plan algorithms using flowcharts or pseudocode
- Design user interfaces
3. Coding
After designing solution, we need to choose a suitable high-level programming language. This stage is often referred to as implementation. When writing programs you might find it takes several attempts before program compiles.
Key Activities:
- Choose programming language
- Write program code
- Fix syntax errors
- Debug the code
- Compile and execute
4. Testing
Testing can be done through trace table. Testing can ensure program really works under all circumstances. There are different development methodologies including waterfall, iterative and rapid application development model.
Key Activities:
- Create test plans
- Use trace tables
- Test under all conditions
- Identify and fix bugs
- Verify requirements are met
5. Maintenance
Program is maintained throughout its life, to ensure it continues to work effectively. This involves dealing with any problems that arise during use, including correcting any errors that come to light, improving functionality, or adapting program to meet new requirements.
Key Activities:
- Fix bugs discovered in use
- Improve functionality
- Adapt to new requirements
- Update documentation
- Ensure continued effectiveness
Analysis Stage Details
First Step: Investigation
Investigate issues and Current System if there is one. Problem needs to be defined clearly and precisely.
Second Step: Planning
Plan a solution. Sometimes there is more than one solution. You need to decide which is most appropriate.
Third Step: Solution Approach
Decide how to solve problem:
- Bottom-Up: Start with a small sub-problem and then build on this
- Top-Down: Stepwise refinement using pseudocode, flowcharts or structure charts
A clear document stating exactly what the program must do
Design & Coding Details
Design Considerations
Start with identifier table. Think about data structures: 1D/2D arrays, files for long-term storage.
Algorithm Planning
Plan your algorithm by drawing a flowchart or writing pseudocode.
Coding Challenges
When coding, you might find it takes several attempts before program compiles. When it finally does, it might 'crash' (stop working), requiring debugging.
Syntax Errors
A 'grammatical' error in which a program statement does not follow rules of the high-level language.
When program runs and gives output: 'It works!!!!' But does it do what it was meant to do?
Real-Life Example: School Library System
Imagine developing a new library system for your school:
Analysis Phase:
- Investigate: Current paper-based system is slow and error-prone
- Requirements: Track books, students, due dates, fines
- Specification: System must allow book checkout, return, searching
Design & Coding:
- Data structures: Arrays for books and students, file for storage
- Algorithms: Search, sort, calculate fines
- Coding: Choose Python, write functions, debug syntax errors
Following the development lifecycle ensures the library system works correctly, can be maintained by other developers, and meets the school's needs.
Activity 1: Match Development Stages
Match each development stage with its correct description:
Stages:
- Analysis
- Design
- Coding
- Testing
- Maintenance
Descriptions:
- A. Writing the program code and debugging syntax errors
- B. Ensuring the program continues to work effectively during use
- C. Investigating the problem and creating requirements specification
- D. Planning algorithms and data structures using flowcharts or pseudocode
- E. Using trace tables to ensure program works under all conditions
Solution:
- Analysis → C. Investigating the problem and creating requirements specification
- Design → D. Planning algorithms and data structures using flowcharts or pseudocode
- Coding → A. Writing the program code and debugging syntax errors
- Testing → E. Using trace tables to ensure program works under all conditions
- Maintenance → B. Ensuring the program continues to work effectively during use
Explanation: The stages must be completed in order for a well-structured development process. Analysis defines what to build, Design shows how to build it, Coding creates it, Testing verifies it works, and Maintenance keeps it working.
Check Your Understanding: Development Stages
1. What is the main purpose of following a program development lifecycle? [2 marks]
Answer
- [1 mark] To develop a successful program that performs a specific task or solves a given problem
- [1 mark] To ensure development is well ordered and clearly documented so it can be understood and used by other developers
- [Additional] Provides structure and ensures all aspects of development are considered
2. What is produced during the analysis stage? [2 marks]
Answer
- [1 mark] A clear and precise definition of the problem
- [1 mark] A requirements specification document
- [Additional] Investigation of current system if one exists, and planning of solution approach
3. What are the two approaches mentioned for solving problems in the analysis stage? [2 marks]
Answer
- [1 mark] Bottom-Up: Start with a small sub-problem and then build on this
- [1 mark] Top-Down: Stepwise refinement using pseudocode, flowcharts or structure charts
- [Additional] Both approaches help break down complex problems into manageable parts
4. What is a syntax error? [2 marks]
Answer
- [1 mark] A 'grammatical' error in programming
- [1 mark] When a program statement does not follow rules of the high-level language
- [Additional] These errors prevent the program from compiling and must be fixed before testing
5. What happens during the maintenance stage? [3 marks]
Answer
- [1 mark] Program is maintained throughout its life to ensure it continues to work effectively
- [1 mark] Dealing with any problems that arise during use, including correcting errors
- [1 mark] Improving functionality or adapting program to meet new requirements
- [Additional] Maintenance is ongoing and happens after the program is deployed
Development Methodologies
Different development methodologies are used depending on the program being developed. The main models are Waterfall, Iterative, and Rapid Application Development (RAD).
Model Comparison
Waterfall Model
Linear sequential development cycle where each stage is completed and signed off before next stage is begun.
Best for:
Smaller projects with short timescale, well-known requirements unlikely to change
Iterative Model
Develops a simple subset of requirements first, then expands/enhances with repeated cycles until full system is developed.
Best for:
Projects where major requirements are known but details may change or evolve
RAD Model
Develops different parts of requirements in parallel using prototyping for early user involvement.
Best for:
Complicated projects needing short timeframe development for evolving business needs
The Waterfall Model
Principles
- Linear - each stage is completed before the next is begun
- Well documented - full documentation is completed at every stage
- Low customer involvement - only involved at start and end of the process
Visual Representation:
Stages flow downwards like a waterfall (one-way)
Merits vs Demerits
| Merits (Advantages) | Demerits (Disadvantages) |
|---|---|
| Easy to understand and use as stages are clearly defined | Difficult to change requirements at a later stage |
| Stages do not overlap and are completed one at a time | Not suitable for programs where requirements could be subject to change |
| Easy to manage due to fixed stages in model and Each stage has specific deliverables | No working software is produced until late during life cycle |
| Works well for smaller programs where requirements are known and understood | Not suitable for long, object-oriented and complex projects |
| It is difficult to measure progress within stages | |
| Integration is done at very end, which doesn't allow identifying potential technical issues early |
The Iterative Model
This development cycle first develops a simple subset of requirements, then expands or enhances the model and runs the development cycle again. These program development cycles are repeated until the full system has been developed.
Principles
- Incremental development as program development lifecycle is repeated
- Working programs are produced for part of system at every iteration
- High customer involvement, as part of system can be shown to the customer after every iteration
Visual Representation:
Merits vs Demerits
| Merits (Advantages) | Demerits (Disadvantages) |
|---|---|
| Some working programs developed quickly at an early stage in lifecycle | Only large software development projects can benefit because it is hard to break a small software system into further small serviceable modules |
| Easier to test and debug smaller programs | Design issues might arise because not all requirements are gathered at the beginning of the entire life cycle |
| More flexible as easier to alter requirements and Progress can be measured | More resources may be required |
| Customers involved at each iteration therefore no surprises when final system delivered | Needs good planning overall and for every stage |
| Software is produced early, which facilitates customer evaluation and feedback | Defining increments may require definition of the complete system |
| Better suited for large and mission-critical projects | |
| Parallel development can be planned | |
| Less costly to change the scope / requirements | |
| Risks are identified and resolved during iteration. Easier to manage risk as high-risk part is done first |
Rapid Application Development (RAD) Model
This development cycle develops different parts of requirements in parallel, using prototyping to provide early user involvement in testing. Program development cycles are run in parallel for each part of requirement, using a number of different teams. Prototyping is used to show initial versions to customers to obtain early feedback.
RAD Parallel Development Teams
In RAD, multiple teams work on different parts of the system simultaneously:
Team 1
- Analysis
- Design
- Coding
- Testing
- Maintenance
Developing: User Interface Module
Team 2
- Analysis
- Design
- Coding
- Testing
- Maintenance
Developing: Database Module
Team 3
- Analysis
- Design
- Coding
- Testing
- Maintenance
Developing: Reporting Module
Teams develop different modules simultaneously, using prototypes for early feedback
Principles
- Minimal planning
- Reuses previously written code where possible, makes use of automated code generation where possible
- High customer involvement, as customers can use the prototypes during development
- Suitable for complicated projects that need developing in a short timeframe to meet evolving needs of a business
Benefits vs Drawbacks
| Benefits (Advantages) | Drawbacks (Disadvantages) |
|---|---|
| Reduced overall development time | System under development needs to be modular |
| Rapid frequent customer feedback informs development | Needs strong teams of skilled developers and designers |
| Very flexible as requirements evolve from feedback during development | Not suitable for short simple projects |
| As parts of system are developed side by side, modification is easier because each part must work independently | Suitable for systems that are component based and scalable |
| Progress can be measured | |
| Reduces development time | |
| Encourages customer feedback |
Real-Life Example: Mobile App Development
Different development models applied to a mobile app project:
Waterfall Approach:
- Scenario: Simple calculator app with clear, fixed requirements
- Process: Complete analysis, then design, then code, then test
- Why it works: Requirements won't change; small scope
Iterative Approach:
- Scenario: School homework tracking app
- Process: Build basic version first (add assignments), then add features (notifications, grades)
- Why it works: Can get feedback from teachers after each version
RAD Approach:
- Scenario: Social media app startup
- Process: Multiple teams: one works on profiles, another on messaging, another on news feed
- Why it works: Need to launch quickly, requirements will change based on user feedback
Choosing the right model depends on project size, requirements certainty, timeline, and need for customer feedback.
Activity 2: Choose the Right Development Model
For each scenario below, recommend whether Waterfall, Iterative, or RAD would be most appropriate and explain why:
- A banking system update to calculate interest rates. The requirements are well-defined and unlikely to change. The project has a fixed deadline.
- A new e-commerce website for a startup. The basic requirements are known (product listings, shopping cart), but specific features will depend on early user feedback. The startup wants to launch a basic version quickly.
- A complex hospital management system with many modules (patient records, appointments, billing, pharmacy). The system is mission-critical and requirements are complex but mostly known.
- A mobile game development where the game mechanics will evolve based on player testing. The development team wants to test core gameplay first before adding levels and features.
Solution:
-
Recommended: Waterfall Model
Why: Requirements are well-defined and unlikely to change. Fixed deadline and clear deliverables suit Waterfall's linear approach. Banking systems need rigorous documentation which Waterfall provides. -
Recommended: RAD Model
Why: Startup needs quick launch and requirements will evolve based on user feedback. RAD's parallel development and prototyping allow fast delivery and adaptation to feedback. -
Recommended: Iterative Model
Why: Complex system with known major requirements but many components. Iterative allows building modules incrementally, managing complexity, and getting feedback on each part. Mission-critical nature benefits from early testing of components. -
Recommended: Iterative Model
Why: Game mechanics will evolve based on testing. Iterative allows developing core gameplay first (iteration 1), then adding features based on player feedback in subsequent iterations.
Key Decision Factors:
• Waterfall: Clear, unchanging requirements; fixed deadlines; need for thorough documentation
• Iterative: Complex systems; evolving requirements; benefit from incremental feedback
• RAD: Fast delivery needed; requirements uncertain; strong customer involvement desired
Check Your Understanding: Development Methodologies
1. What are the three main development methodologies discussed? [3 marks]
Answer
- [1 mark] Waterfall model
- [1 mark] Iterative model
- [1 mark] Rapid Application Development (RAD) model
- [Additional] Each has different approaches suitable for different types of projects
2. Describe the key characteristic of the Waterfall model. [2 marks]
Answer
- [1 mark] It is a linear sequential development cycle
- [1 mark] Each stage is completed and signed off before the next stage is begun
- [Additional] Like water flowing down a waterfall, it only goes in one direction
3. What is the main advantage of the Iterative model? [2 marks]
Answer
- [1 mark] Working programs are produced for part of the system at every iteration
- [1 mark] Allows for early customer feedback and easier adaptation to changing requirements
- [Additional] Reduces risk by testing parts of the system early
4. How does RAD differ from the other models? [3 marks]
Answer
- [1 mark] Develops different parts of requirements in parallel using multiple teams
- [1 mark] Uses prototyping to provide early user involvement in testing
- [1 mark] Has minimal planning and reuses code where possible
- [Additional] Designed for rapid development in short timeframes with evolving requirements
5. When would you choose the Waterfall model over RAD? [2 marks]
Answer
- [1 mark] For smaller projects with a short timescale
- [1 mark] When requirements are well known and unlikely to change
- [Additional] When thorough documentation is more important than rapid delivery
6. What is a key drawback of the Waterfall model? [2 marks]
Answer
- [1 mark] Difficult to change requirements at a later stage
- [1 mark] No working software is produced until late during the life cycle
- [Additional] Integration happens at the very end, so technical issues may not be identified early
Key Takeaways
- The program development lifecycle has five stages: Analysis, Design, Coding, Testing, and Maintenance
- The purpose of the lifecycle is to develop successful programs through well-ordered, documented processes that other developers can understand
- Analysis involves investigating the problem, defining requirements clearly, and creating a requirements specification
- Design uses the specification to plan data structures and algorithms using tools like flowcharts or pseudocode
- Coding involves writing and debugging program code, dealing with syntax errors that violate language rules
- Testing ensures the program works under all conditions, often using trace tables
- Maintenance keeps the program working effectively by fixing errors, improving functionality, and adapting to new requirements
- The Waterfall model is linear and sequential, best for small projects with clear, unchanging requirements
- The Iterative model develops systems in repeated cycles, best for projects where requirements may evolve
- The RAD model uses parallel development and prototyping for rapid delivery, best for complex projects with tight deadlines
- Waterfall advantages: Easy to understand, well-documented, easy to manage with fixed stages
- Waterfall disadvantages: Difficult to change requirements, no working software until late, not suitable for complex projects
- Iterative advantages: Early working software, customer feedback at each iteration, flexible to changes
- Iterative disadvantages: Needs good planning, design issues may arise, best for large projects
- RAD advantages: Reduced development time, frequent customer feedback, flexible to evolving requirements
- RAD disadvantages: Needs modular systems, requires skilled teams, not suitable for simple projects
- Choosing the right model depends on project size, requirements certainty, timeline, and need for customer involvement
Question Bank
1. Explain the purpose of following a program development lifecycle. [4 marks]
Marking Scheme & Answer
- [1 mark] To develop a successful program that performs a specific task or solves a given problem
- [1 mark] To ensure development is well ordered and clearly documented
- [1 mark] So that the development process can be understood by other developers
- [1 mark] To ensure all aspects of development are considered (analysis, design, coding, testing, maintenance)
- [Additional] Provides structure and methodology rather than ad-hoc development
2. Describe what happens during each of the five stages of program development. [10 marks]
Marking Scheme & Answer
- [2 marks] Analysis: Investigate the problem and current system if one exists. Define requirements clearly and precisely. Create a requirements specification. Plan solution approach (top-down or bottom-up).
- [2 marks] Design: Start with identifier table. Design data structures (arrays, files). Plan algorithms using flowcharts or pseudocode. Design user interfaces if needed.
- [2 marks] Coding: Choose suitable programming language. Write program code. Debug syntax errors (grammatical errors violating language rules). Compile and execute program.
- [2 marks] Testing: Use trace tables to test program. Ensure program works under all conditions. Identify and fix bugs. Verify requirements are met.
- [2 marks] Maintenance: Ensure program continues working effectively. Fix errors discovered during use. Improve functionality. Adapt program to meet new requirements.
3. Compare and contrast the Waterfall and Iterative development models. [8 marks]
Marking Scheme & Answer
| Aspect | Waterfall Model | Iterative Model |
|---|---|---|
| Approach | Linear sequential - each stage completed before next begins | Cyclical - development cycles repeated with expansion each time |
| Requirements | Well-known and unlikely to change | May evolve or change during development |
| Customer Involvement | Low - mainly at start and end | High - feedback after each iteration |
| Working Software | Produced only at the end | Produced at each iteration |
| Flexibility | Low - difficult to change requirements later | High - easier to adapt to changes |
| Best For | Small projects with clear requirements | Large, complex projects where requirements may evolve |
| Risk Management | Risks identified late (at integration) | Risks identified and resolved early in iterations |
| Documentation | Thorough documentation at each stage | Documentation evolves with each iteration |
Key comparison: Waterfall is rigid but well-documented; Iterative is flexible with early deliverables.
4. Explain what is meant by 'syntax error' and give an example. [3 marks]
Marking Scheme & Answer
- [1 mark] A syntax error is a 'grammatical' error in programming
- [1 mark] It occurs when a program statement does not follow the rules of the high-level language
- [1 mark] Example: In Python:
print("Hello world"(missing closing parenthesis) orx = 5 +(incomplete expression) - [Additional] Syntax errors prevent the program from compiling and must be fixed before testing can proceed
5. A company is developing a new online booking system for a chain of hotels. The basic requirements are known (room availability, booking, payment), but the company wants to add features based on customer feedback after launch. Which development model would be most suitable and why? [4 marks]
Marking Scheme & Answer
- [2 marks] Most suitable: Iterative model
- [1 mark] The basic requirements are known, which allows development to begin
- [1 mark] Features will be added based on customer feedback, which fits the iterative approach of expanding/enhancing after each cycle
- [Additional] The iterative model allows launching a basic version first (iteration 1), then adding features in subsequent iterations based on feedback. This is better than Waterfall (can't easily add features later) or RAD (which assumes parallel development of all parts from the start).
6. Describe two advantages and two disadvantages of the RAD model. [4 marks]
Marking Scheme & Answer
Advantages:
- [1 mark] Reduced overall development time
- [1 mark] Rapid frequent customer feedback informs development
- Other advantages: Very flexible, progress can be measured, encourages customer feedback
Disadvantages:
- [1 mark] System under development needs to be modular
- [1 mark] Needs strong teams of skilled developers and designers
- Other disadvantages: Not suitable for short simple projects, requires good component-based design
7. What is the purpose of creating a requirements specification during the analysis stage? [3 marks]
Marking Scheme & Answer
- [1 mark] To define the problem clearly and precisely
- [1 mark] To specify exactly what the program is required to do
- [1 mark] To provide a clear reference for the design and development stages
- [Additional] Acts as a contract between developers and stakeholders, ensuring everyone agrees on what will be built
8. Why is maintenance an important stage in the program development lifecycle? [3 marks]
Marking Scheme & Answer
- [1 mark] To ensure the program continues to work effectively throughout its life
- [1 mark] To correct any errors that come to light during use
- [1 mark] To improve functionality or adapt the program to meet new requirements
- [Additional] Programs often need updates due to changing technology, user needs, or discovered bugs
9. Describe a situation where the Waterfall model would be inappropriate. [3 marks]
Marking Scheme & Answer
- [1 mark] When developing a large, complex system with many unknown requirements
- [1 mark] When requirements are likely to change during development
- [1 mark] When early customer feedback is needed to guide development
- [Additional] Examples: Social media apps, innovative software products, systems for rapidly changing business environments
10. Explain how prototyping is used in the RAD model. [3 marks]
Marking Scheme & Answer
- [1 mark] Prototypes are initial versions of the software shown to customers
- [1 mark] They provide early user involvement in testing
- [1 mark] Customer feedback from prototypes guides further development
- [Additional] Allows customers to see and use parts of the system early, ensuring it meets their needs before full development