Iterative Incremental Approach ENG - DavidMyrseth/BuketovPY GitHub Wiki
๐ฏ Lesson Objective
The goal is to explore different software development methodologies: the Iterative Model, the Incremental Model, and the Waterfall Model. ๐ง Theoretical Part Iterative Model
The Iterative Model is a software development approach that involves repeating development cycles. A project is divided into smaller parts, each of which is improved and refined through multiple iterations.
Example: Imagine building a house by starting with a small model. With each iteration, the model is enhanced with new details and improvements.
Iterative Model ๐ธ When to Use the Iterative Model
Requirements are clearly defined and understandable.
The software application is large-scale.
Changes are expected in the future.
โ Advantages of the Iterative Model
Easier testing and debugging due to smaller iterations.
Supports parallel development.
Adapts well to changing requirements.
Risks are identified and resolved early.
Less time spent on documentation, more on design.
Early feedback and continuous improvement.
Early detection of issues and risk reduction.
๐งช Task: Build a "Mini Calculator" Using the Iterative Approach Iteration 1 โ Simple Addition
Program asks for two numbers and returns their sum.
Displays the result to the user.
โฑ๏ธ Time: 10โ15 min ๐ Manual Testing:
2 + 3 โ 5
1 + 4 โ 5
0 + 0 โ 0
Iteration 2 โ More Operations
Add subtraction, multiplication, and division.
Create a selection menu:
Add
Subtract
Multiply
Divide
โฑ๏ธ Time: 10โ15 min ๐ Testing:
Try each operation with different values.
Include both integers and floating-point numbers.
Iteration 3 โ Input Validation
Ensure the user enters numbers.
Prevent division by zero.
โฑ๏ธ Time: 10โ15 min ๐ Testing:
Enter a letter or empty input โ program shouldn't crash.
Try dividing by zero โ program should show an error message.
Iteration 4 โ Logical Enhancements
Add feature: "Show previous result" or a history list of all calculations.
โฑ๏ธ Time: 10โ15 min ๐ Testing:
Perform multiple calculations โ verify history is correct.
Re-test all operations for stability.
๐งฑ Incremental Process Model
The Incremental Model starts with a basic system built with core functionality and delivered to the client. Additional features are developed and delivered in subsequent versions.
Incremental Model ๐ Phases of the Incremental Model
Requirement Analysis: Plan only for the next version, enabling flexibility.
Design & Development: Start with independent core functions, then build on them.
Deployment & Testing: Deliver and test each version incrementally.
Final Implementation: The final version is fully deployed to the client.
Example: Building a house step by step: foundation, walls, roof, interior... ๐งฉ Types of Incremental Models
Staged Delivery Model: Each part of the project is delivered separately.
Staged Delivery
Parallel Development Model: Subsystems are developed simultaneously to reduce time-to-market (TTM).
Parallel Development โ When to Use the Incremental Model
Early product delivery is needed.
Project includes risks or new technology.
Requirements are mostly known beforehand.
Effective for long development cycles.
โ Advantages
Faster delivery.
Clear progress for the client.
Easier to implement changes.
Risk management via early testing.
Flexible and cost-effective scope adjustments.
โ Disadvantages
Requires skilled team and planning.
May lead to higher overall cost.
Poor initial requirement definition may affect system design.
Fixes in one part might affect others.
๐ฅ Practical Task โ Hospital Patient Management System (Incremental Model) ๐ฏ Goal:
Apply the Incremental Process Model to build a step-by-step console application to manage hospital data. ๐ Increment 1 โ Manage Patients
Add patients (name, age)
View patient list
๐ Data stored in a simple list.
๐ Increment 2 โ Manage Doctors
Add doctors (name, specialty)
View doctor list
๐ Increment 3 โ Manage Appointments
Create appointment (link patient & doctor)
View appointments
๐ Increment 4 (Optional) โ Export Functionality
Save data to a .txt file.
Load data from file.
๐ง Waterfall Method
The Waterfall Model is a traditional linear software development process. Each phase is completed before moving to the next: requirements โ design โ development โ testing โ deployment.
Waterfall Model ๐ธ Stages of the Waterfall Model
Requirements: Define project goals, scope, resources, and schedule.
Design: Plan system architecture and tasks.
Implementation: Develop based on design.
Verification: Test the software.
Maintenance: Fix issues and update after release.
โ Benefits of Waterfall
Clear project structure.
Fixed costs and timeline.
Easy progress tracking (e.g., Gantt charts).
Ideal for repetitive, similar projects.
Strong documentation and historical tracking.
Better risk mitigation during planning.
Defined roles and responsibilities.
Suitable for less experienced teams.
Less scope creep due to fixed requirements.
โ Limitations of Waterfall
Longer delivery time.
Limited flexibility for innovation.
Less opportunity for client feedback mid-process.
Higher chance of post-launch changes.
Delay if one phase encounters issues.
๐ Development Models as Construction Metaphors Waterfall Approach (Sequential Building)
Requirements: Define size, rooms, materials.
Design: Create blueprints.
Construction: Build as per design.
Inspection: Ensure compliance.
Handover: Deliver the finished house.
Iterative Model (Cyclical Building)
Plan & Prototype: Build a rough model.
Iteration 1: Foundation and frame โ inspection.
Iteration 2: Interior finishes, doors/windows โ inspection and feedback.
Iteration 3: Final finishes and landscaping โ final inspection.
Incremental Model (Layered Building)
Increment 1: Foundation and frame.
Increment 2: Roof, walls, plumbing.
Increment 3: Electrical, interior design.
Final Increment: Landscaping, final polish.