0% found this document useful (0 votes)
2 views3 pages

Chapter7 Algorithm Design Revision Notes Detailed

Chapter 7 covers the Program Development Life Cycle (PDLC), detailing stages from problem identification to maintenance. It explains the purpose of algorithms and standard methods of solution, including validation and verification processes. The chapter also discusses test data types and error identification, providing a comprehensive overview for effective algorithm design and problem-solving.

Uploaded by

sudhialerts
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

Chapter7 Algorithm Design Revision Notes Detailed

Chapter 7 covers the Program Development Life Cycle (PDLC), detailing stages from problem identification to maintenance. It explains the purpose of algorithms and standard methods of solution, including validation and verification processes. The chapter also discusses test data types and error identification, providing a comprehensive overview for effective algorithm design and problem-solving.

Uploaded by

sudhialerts
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 7 – Algorithm Design & Problem Solving

■ Detailed, Exam-Ready Revision Notes with Tables

7.1 Program Development Life Cycle (PDLC)


Stages involved in developing software from idea to maintenance.

Stage Purpose / Description


Problem Identification Understand and define the problem clearly; identify inputs, processing, outputs
Analysis Break down the problem, decide what data is needed, how it's processed, and
Design Plan logic using flowcharts, pseudocode, or structure diagrams.
Development (Coding) Write code following design using good programming practices.
Testing Use normal, boundary, and erroneous data to detect and fix errors.
Documentation User + technical documentation for operation and maintenance.
Implementation Install, train users, and switch systems.
Maintenance Fix bugs, improve features, adapt to new needs.

7.2 Computer System, Sub-systems & Decomposition


Computer system: Hardware + Software + People

Sub-system: Smaller component performing a specific function.

Decomposition: Breaking down a big problem into manageable parts.

Example: ATM → Sub-systems: Card Reader, Cash Dispenser, Account Management.

7.3 Purpose of an Algorithm


Algorithm = Step-by-step process that is Clear, Finite, and Effective.

Main purposes:

• Plan before coding


• Break down problems
• Ensure correctness
• Enable reuse & communication

7.4 Standard Methods of Solution


Method Purpose Example / Notes
Counting Count items meeting a condition Count ← 0; FOR i ← 1 TO N; IF A[i]>50 THEN Count ← Coun
Totalling Add all values together Total ← 0; FOR i ← 1 TO N; Total ← Total+Marks[i]
Max/Min Find largest/smallest value Max ← A[1]; FOR i ← 2 TO N; IF A[i]>Max THEN Max ← A[i]
Searching Find if item exists FOR i ← 1 TO N; IF Name[i]='John' THEN Found ← TRUE
Sorting Arrange in order Bubble Sort (swap adjacent if wrong order)
Subroutines Divide into smaller reusable partsFunctions and procedures

7.5 Validation and Verification


Validation: Checks data is sensible, not necessarily correct.

Validation Check Purpose Example


Range Check Ensures data within limits Age 0–120
Type Check Checks data type Age must be number
Length Check Checks length PIN must be 4 digits
Format Check Follows pattern Email must contain @
Presence Check Not empty Name field cannot be blank
Lookup Check Within allowed list Country must exist in list

Verification: Ensures data is entered/transferred correctly.

Verification Method Purpose Example


Double Entry Ensure same data entered twice matchesTyping password twice during setup
Visual Check Compare entered data to original source Re-check printed forms

7.6 Test Data & Trace Tables


Type of Test Data Description Example (Age ≥ 18)
Normal Within valid range 25
Boundary At edges of valid range 17, 18, 19
Invalid Outside valid range -1, 200
Erroneous Wrong data type 'eighteen', @
Extreme Unusually large/small but valid 0, 9999

Trace Table: Used for dry runs to follow variable values step-by-step.

7.8 Identifying Errors


Error Type Cause Example
Syntax Breaks programming rules Missing ENDIF or THEN
Logic Algorithm incorrect → wrong result Using > instead of <
Runtime Occurs during program execution Divide by zero, file not found
■ Final Memory Sheet
Topic Key Points
PDLC Problem → Analysis → Design → Coding → Testing → Documentation → Implementatio
Algorithm Clear, Finite, Effective
Test Data Normal, Boundary, Invalid, Erroneous, Extreme
Errors Syntax (won’t run), Logic (wrong output), Runtime (crash)
Trace Table Manual dry run; follows variable updates

You might also like