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

Steps in Problem Solving Template - Age Prog

The document outlines a structured approach to problem solving and program design, detailing five steps for problem solving and nine steps for programming. It includes a specific example of creating an algorithm and program to calculate an individual's age based on the current year and their year of birth. The steps encompass defining the problem, proposing solutions, outlining the solution, developing the algorithm, coding, and maintaining the program.

Uploaded by

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

Steps in Problem Solving Template - Age Prog

The document outlines a structured approach to problem solving and program design, detailing five steps for problem solving and nine steps for programming. It includes a specific example of creating an algorithm and program to calculate an individual's age based on the current year and their year of birth. The steps encompass defining the problem, proposing solutions, outlining the solution, developing the algorithm, coding, and maintaining the program.

Uploaded by

seifertoral
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

PROBLEM SOLVING AND PROGRAM DESIGN

5 Steps in Problem Solving


Step 1 Define the problem (Problem Definition)
Step 2 Propose and Evaluate Solutions
Step 3 Determine and Outline the solution (IPO Chart)
Step 4 Develop the algorithm (Algorithm) / Flow Chart
Step 5 Test and validate the algorithm (Trace Table)

9 Steps in Programming
Step 1 Define the problem (Problem Definition)
Step 2 Propose and Evaluate Solutions
Step 3 Determine and Outline the solution (IPO Chart)
Step 4 Develop the algorithm (Algorithm) / Flow Chart
Step 5 Test and validate the algorithm (Trace Table)
PROGRAM IMPLEMENTATION
Step 6 Code the algorithm into Program (Code program / Create source code)
Step 7 Compile or Interpret or Link program
Step 8 Execute or Run the program (Run on Compiler or Interpreter)
Step 9 Document and maintain the program (add comments, make changes)

Applying Steps 1 to 9 to problem below

(1) Write an algorithm and program to enter the current year, an individual’s year
of birth and it calculates and prints, the age of the individual.

Step 1 Define the problem (Problem Definition)


Write an algorithm and program to read the current year, an individual’s year of birth
and it calculates and prints, the age of the individual.
Step 2 Propose all possible solutions.

1
Step 3 Outline the solution (IPO Chart)

IPO Chart
INPUT PROCESS OUTPUT
CurrentYear Read CurrentYear Age
BirthYear Read Birth Year
Age = CurrentYear -
BirthYear
Print Age

Step 4 Develop the algorithm (Algorithm) / Flow Chart


AgeCalculator
VARIABLES
CurrentYear As Int
BirthYear As Int
Age As Double
BEGIN
PRINT “What is the current year”
READ CurrentYear
PRINT “What is your year of birth”
READ BirthYear
Age = CurrentYear – BirthYear
PRINT “Your age is” Age
END

FLOW CHART

Flow Chart Symbols

INPUT / OUTPUT 2 DECISION

BEGIN
END PROCESS
CONNECTOR

FLOW

Step 5 Test the algorithm (Trace Table)


CODE

Step 6 Code the algorithm (Code program)

Step 7 Compile or Interpret or Link program


This happens automatically in most cases by the program compiler / interpreter.

Step 8 Run the program (Run on Compiler or Interpreter)

Step 9 Document and maintain the program (add comments, make changes)

You might also like