0% found this document useful (0 votes)
13 views4 pages

ALGORITHM DESIGN AND PROBLEM SOLVING

The document outlines the Program Development Life Cycle, which consists of five stages: Analysis, Design, Coding, Testing, and Maintenance. It emphasizes the importance of breaking down complex problems into manageable parts through techniques like abstraction and decomposition, and details the roles of inputs, processes, outputs, and storage in problem-solving. Additionally, it discusses the structure of computer systems and their sub-systems, highlighting the benefits of top-down design for simplifying development and testing.

Uploaded by

levi makokha
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)
13 views4 pages

ALGORITHM DESIGN AND PROBLEM SOLVING

The document outlines the Program Development Life Cycle, which consists of five stages: Analysis, Design, Coding, Testing, and Maintenance. It emphasizes the importance of breaking down complex problems into manageable parts through techniques like abstraction and decomposition, and details the roles of inputs, processes, outputs, and storage in problem-solving. Additionally, it discusses the structure of computer systems and their sub-systems, highlighting the benefits of top-down design for simplifying development and testing.

Uploaded by

levi makokha
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
You are on page 1/ 4

ALGORITHM DESIGN AND PROBLEM SOLVING

The Program Development Life Cycle


The program development life cycle is divided into five main stages:
i. Analysis
ii. Design
iii. Coding
iv. Testing
v. Maintenance

Analysis
✓ Clearly define and set out the problem to ensure everyone understands
the requirements.
✓ Requirements Specification: A detailed list of what the program must
achieve.
✓ Tools Used:
i. Abstraction: Focuses on essential details and removes unnecessary
information.
Example: A map highlights necessary details for traveling.
ii. Decomposition: Breaks a complex problem into smaller,
manageable parts. These smaller tasks can be further subdivided if
needed.
Example: Getting dressed involves:
1. Selecting items to wear.
2. Removing any clothes currently worn.
3. Putting selected items on in the correct order.

Design
✓ Use the analysis results to plan how the program should be developed.
✓ Clearly outline tasks, how they are to be performed, and their interactions.
✓ Documented using:
▪ Structure Charts
▪ Flowcharts
▪ Pseudocode

Coding and Iterative Testing


✓ Coding: The program is written using an appropriate programming
language.
✓ Iterative Testing:
• Modules of the program are tested individually.
• Identified issues are corrected, and tests are repeated until
the module functions as required.

Testing
✓ Ensure the completed program works as designed.
✓ The program is tested with different sets of data.
✓ Ensures all tasks work together as specified in the program design.

Computer Systems, Sub-Systems, and Decomposition


✓ Computer System
A computer system consists of:
• Components: Software, data, hardware, communication, and
people.
• Sub-Systems: Can be divided into smaller sub-systems, each
performing a single action. Sub-systems can be further divided
as needed.
✓ Interactions
People interact with multiple computer systems daily, often unknowingly.
Example:
• Using an app on a smartphone (e.g., an alarm) involves a
small computer system.
• Checking the weather involves accessing one of the largest
computer systems.

The Computer System and Its Sub-Systems


✓ Top-Down Design:
• Involves decomposing a system into sub-systems, then further
breaking each sub-system down until each performs a single,
manageable action.
• Simplifies problem-solving by tackling smaller components.
• Reduces development and testing time by enabling parallel
work on sub-systems.
▪ Uses structure diagrams, flowcharts, or pseudocode to show
the modular system design.
▪ Sub-systems are often developed as sub-routines.

Decomposing a Problem
To solve a problem using a computer system, break it into components:
i. Inputs:
Data entered into the system during operation.
ii. Processes:
Tasks performed using input data and stored data.
iii. Outputs:
Information displayed or printed for users.
iv. Storage:
Data stored in files for future use.

Example 1: An Alarm App


• Inputs:
➢ Time to set the alarm, removing a set alarm, switching off the
alarm, pressing the snooze button.
• Processes:
➢ Check if the current time matches a set alarm time.
➢ Manage alarm times and snooze functions.
• Outputs:
➢ Continuous sound/tune when the alarm time is reached or
after snooze expires.
• Storage:
➢ Store alarm times for future use.

You might also like