SlideShare a Scribd company logo
2
Most read
16
Most read
19
Most read
DFC1023
PROBLEM SOLVING & PROGRAM DESIGN
CHAPTER 2:
PROBLEM SOLVING METHODS
S U B TO P I C 2 . 2 : P R O G R A M M I N G L I F E
C YC L E ( P LC )
AT THE END OF THIS CHAPTER, STUDENTS
SHOULD BE ABLE TO:
Understand Problem solving concept
 Explain the phases in Programming Life Cycle
a. Specify the problem
b. Analyze the problem
c. Design the algorithm to solve the problem
d. Implement the algorithm
e. Test and verify the completed program
f. Maintain and update the program
g. Documentation
PROGRAMMING LIFE CYCLE
Programming Life Cycle:
A framework or discipline, which uses certain
techniques needed in computer programming
development.
Life Cycle:
Refers to the changes made from an
old to a new program (the cycle starts again).
PHASES IN PROGRAMMING LIFE CYCLE
SPECIFY THE
PROBLEM
ANALYZE THE
PROBLEM
DESIGN THE
ALGORITHM
IMPLEMENT
THE ALGORITHM
TEST AND
VERIFY
MAINTAIN AND
UPDATE THE
PROGRAM
DOCUMENTATION
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 1 – SPECIFY THE PROBLEM
• studies the problem.
• investigate the need for possible software automation in the given
system.
• specific recommendations for the problem.
Purposes:
 to find the need and
 to define the problem that needs to be solved.
 identify the operators and
 formula need to be used
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 2: ANALYZE THE PROBLEM
Purpose:
To describe in detail a solution to a problem and
information needed in solving the problem.
How?
Study and understand the problem.
Identify:
The needed input.
The required output.
The needed process. For example: scientific formula
or particular theories.
PHASE 2: ANALYZE THE PROBLEM
In most cases, the solution requires more than one program.
The analyze requirement step consist of three major task :
1. Review requirement – chart, diagram and report.
2. Meet with system analyst and user – enables the programmer to
understand the purpose of requirement from the user perspective.
3. Identify input, process, output and data component. – use IPO chart.
Programmer review the content of IPO Chart with system analyst and
user. This allows programmers to be sure they completely understand
the purpose of the program.
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 3: DESIGN THE ALGORITHM
Definition:
It is a framework or flow that shows the steps in
problem solving.
Methods to design a program:
1. Algorithm
2. Flowchart
3. Pseudo code
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 3: DESIGN THE ALGORITHM
1. Algorithm
• Algorithm is a sequence of instructions to solve a
problem, written in human language, and it can solve
any problems when it is used with the correct
procedure.
• Example:
1. Get Input 3 numbers
2. Total up the 3 numbers using formula:
Total = number1 + number2 + number3
3. Calculate average 3 number using formula;
Average = (number1 + number2 + number3)/3
4. Display Total, Average
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 3: DESIGN THE ALGORITHM
2. Flowchart
 A graphical representation of data, information and
workflow using certain symbols that are connected to
flow lines to describe the instructions done in problem
solving.
 It shows the flow of the process from the start to the
end of the problem solving.
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 3: DESIGN THE ALGORITHM
2. Flowchart
Basic
Flowchart
symbol:
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 3: DESIGN THE ALGORITHM
3. Pseudo code
 Steps in problem solving that is written half in
programming code and half in human language.
 Example:
START
Input number1, number2, number3;
Total = number1 + number2 + number3;
Average = (number1 + number2 + number3)/3
Display Total, Average;
END
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 4: IMPLEMENT THE ALGORITHM
Definition: Writing problem solving into certain programming language such as C,
COBOL and others.
Problem solving: Instructions before it is coded into programming language.
Purpose: To produce a program to develop a system
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 4: IMPLEMENT THE ALGORITHM
o Example:
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 5: TEST AND VERIFY THE PROGRAM
o Testing: Using a set of data to discover errors and
to ensure accuracy of the program.
o Diagram indicates the process of testing:
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 5: TEST AND VERIFY THE PROGRAM
 Debug: Debugging is a process of identifying and
correcting error.
o Three types of error:
oSyntax error (grammatical error)
oRuntime error
oLogic error
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 5: TEST AND VERIFY THE PROGRAM
1. Syntax error (grammatical error)
 Occurs when the rules of programming language are not
applied.
 Correction is done during the program coding.
 The bug can be traced during the compilation.
 Also known as compile-time error.
 Must be corrected before executing and testing the program.
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 5: TEST AND VERIFY THE PROGRAM
2. Run time error
 Occur when a program with no syntax error asks the computer to do something that
the computer is unable to reliably do.
 Example:
 trying to divide by a variable that contains a value zero
 trying to open a file that does not exists
3. Logic error
 Cannot be traced by compiler.
 Corrected during the problem solving process.
 Example output for average is 4, but when it runs, the output is 2.
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 6: MAINTAIN AND UPDATE THE PROGRAM
Activity that verifies whether the operational system is performing as planned or an
activity to modify the system to meet the current requirement.
The process of changing a system after it has been applied to maintain its ability. The
changes may involve simple changes such as error correcting.
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 6: MAINTAIN AND UPDATE THE PROGRAM
How to maintenance?
 Testing – Test the ability of the system.
 Measurement – Access data time. Example, time to save, print and others.
 Replacement – Replace the old system to new system.
 Adjustment – Adding needs to new system.
 Repair – For example: An old system cannot update the new data
 Updating – Update the database.
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 7: DOCUMENTATION
 Definition:
A written or graphical report of the steps taken
during the development of a program.
 Purpose:
It will be useful in the future, in case of
modification or maintenance.
PHASES IN PROGRAMMING LIFE CYCLE
PHASE 7: DOCUMENTATION
Content of documentation:
 Description of the program.
 Specification of program requirement
 Program design such as pseudo code and flowchart
 List of program and comments (to explain about the program).
 Test results.
 User’s manual book.
 Program capabilities and limitation.

More Related Content

PPT
2.2 Demonstrate the understanding of Programming Life Cycle
PDF
Modul asas Ms power point
PPTX
Keperluan perisian
PPTX
BAB 3 Perisian Aplikasi
PPTX
HADIS : RASUAH SEM 4
DOC
Unit10 : pengawalan
DOC
Qada dan qadar
PDF
Nota Sejarah Tingkatan 5 Bab 9: Malaysia Dalam Kerjasama Antarabangsa.
2.2 Demonstrate the understanding of Programming Life Cycle
Modul asas Ms power point
Keperluan perisian
BAB 3 Perisian Aplikasi
HADIS : RASUAH SEM 4
Unit10 : pengawalan
Qada dan qadar
Nota Sejarah Tingkatan 5 Bab 9: Malaysia Dalam Kerjasama Antarabangsa.

What's hot (20)

PPTX
BAB 1 Pengenalan teknologi maklumat
PPTX
User Acceptance Test (UAT)
PPTX
Perkhidmatan Bank Perdagangan - PERDAGANGAN TINGKATAN 5
PPT
Kepentingan Dasar Luar
PPT
Bab 4 an025 nilai masa wang
PPT
Konsep Dan Asas Pengaturcaraan
PPT
Jenis Jenis Litar Elektrik
PDF
Pengaturcaraan c
PPT
Sistem nombor
PPTX
Ip address
PPTX
5 maksud dan jenis perisian
PPTX
1.1 konsep jual beli
PPTX
bab 2: inflasi dan kos sara hidup stpm 2017
PPTX
Bab 2-Fungsi Pengurusan
PPTX
Tempahan
PPTX
Bab 2 Permintaan, Penawaran & Kesimbangan pasaran
DOCX
Komponen asas komputer
PPTX
7.0 sumbangan malaysia dalam pertubuhan antarabangsa
PPTX
penyelenggaraan komputer
PPTX
BAB 4 Perisian operasi
BAB 1 Pengenalan teknologi maklumat
User Acceptance Test (UAT)
Perkhidmatan Bank Perdagangan - PERDAGANGAN TINGKATAN 5
Kepentingan Dasar Luar
Bab 4 an025 nilai masa wang
Konsep Dan Asas Pengaturcaraan
Jenis Jenis Litar Elektrik
Pengaturcaraan c
Sistem nombor
Ip address
5 maksud dan jenis perisian
1.1 konsep jual beli
bab 2: inflasi dan kos sara hidup stpm 2017
Bab 2-Fungsi Pengurusan
Tempahan
Bab 2 Permintaan, Penawaran & Kesimbangan pasaran
Komponen asas komputer
7.0 sumbangan malaysia dalam pertubuhan antarabangsa
penyelenggaraan komputer
BAB 4 Perisian operasi
Ad

Similar to POLITEKNIK MALAYSIA (20)

PDF
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
PDF
GE3151 PSPP _Unit 1 notes and Question bank.pdf
PDF
Problem solving methodology
PPTX
Introduction to computer science
PPTX
lecture 5
PPTX
Introduction to problem solving Techniques
PPT
Unit 1 python (2021 r)
PPTX
Programming_Lecture_1.pptx
PDF
Introduction to Computer Programming
PPTX
Software develop....
 
PPTX
Module 1 python.pptx
PDF
Problem Solving Techniques and Introduction to C
PPTX
SYSTEM DEVELOPMENTS LIFE CYCLE BSC I 2018
DOCX
Chapter 2(1)
PPTX
Programming C ppt for learning foundations
PPT
Grade 10 program development cycle
PPTX
Software Development
PDF
PPS_Lab_Manual_2023-24[1] of Programming for problem solving
 
PDF
PROGRAMMING IN C UNIT I.pdffffffffffffffffffffffffd
PPTX
PCCF UNIT 1.pptx
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
GE3151 PSPP _Unit 1 notes and Question bank.pdf
Problem solving methodology
Introduction to computer science
lecture 5
Introduction to problem solving Techniques
Unit 1 python (2021 r)
Programming_Lecture_1.pptx
Introduction to Computer Programming
Software develop....
 
Module 1 python.pptx
Problem Solving Techniques and Introduction to C
SYSTEM DEVELOPMENTS LIFE CYCLE BSC I 2018
Chapter 2(1)
Programming C ppt for learning foundations
Grade 10 program development cycle
Software Development
PPS_Lab_Manual_2023-24[1] of Programming for problem solving
 
PROGRAMMING IN C UNIT I.pdffffffffffffffffffffffffd
PCCF UNIT 1.pptx
Ad

More from Aiman Hud (20)

PDF
POLITEKNIK MALAYSIA
PDF
POLITEKNIK MALAYSIA
PDF
POLITEKNIK MALAYSIA
PDF
POLITEKNIK MALAYSIA
PDF
POLITEKNIK MALAYSIA
PPT
POLITEKNIK MALAYSIA
PPTX
POLITEKNIK MALAYSIA
PPT
POLITEKNIK MALAYSIA
PPT
POLITEKNIK MALAYSIA
PPT
POLITEKNIK MALAYSIA
PPTX
POLITEKNIK MALAYSIA
PPT
POLITEKNIK MALAYSIA
PDF
POLITEKNIK MALAYSIA
PPT
POLITEKNIK MALAYSIA
PPTX
POLITEKNIK MALAYSIA
PPTX
POLITEKNIK MALAYSIA
PPTX
POLITEKNIK MALAYSIA
PPTX
POLITEKNIK MALAYSIA
PPT
POLITEKNIK MALAYSIA
PPT
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA

Recently uploaded (20)

PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by AndrĂŠ Kraus
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
history of c programming in notes for students .pptx
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
Adobe Illustrator 28.6 Crack My Vision of Vector Design
T3DD25 TYPO3 Content Blocks - Deep Dive by AndrĂŠ Kraus
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Monitoring Stack: Grafana, Loki & Promtail
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
Patient Appointment Booking in Odoo with online payment
Wondershare Filmora 15 Crack With Activation Key [2025
Why Generative AI is the Future of Content, Code & Creativity?
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
history of c programming in notes for students .pptx
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Digital Systems & Binary Numbers (comprehensive )
Design an Analysis of Algorithms I-SECS-1021-03
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Designing Intelligence for the Shop Floor.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development

POLITEKNIK MALAYSIA

  • 1. DFC1023 PROBLEM SOLVING & PROGRAM DESIGN CHAPTER 2: PROBLEM SOLVING METHODS S U B TO P I C 2 . 2 : P R O G R A M M I N G L I F E C YC L E ( P LC )
  • 2. AT THE END OF THIS CHAPTER, STUDENTS SHOULD BE ABLE TO: Understand Problem solving concept  Explain the phases in Programming Life Cycle a. Specify the problem b. Analyze the problem c. Design the algorithm to solve the problem d. Implement the algorithm e. Test and verify the completed program f. Maintain and update the program g. Documentation
  • 3. PROGRAMMING LIFE CYCLE Programming Life Cycle: A framework or discipline, which uses certain techniques needed in computer programming development. Life Cycle: Refers to the changes made from an old to a new program (the cycle starts again).
  • 4. PHASES IN PROGRAMMING LIFE CYCLE SPECIFY THE PROBLEM ANALYZE THE PROBLEM DESIGN THE ALGORITHM IMPLEMENT THE ALGORITHM TEST AND VERIFY MAINTAIN AND UPDATE THE PROGRAM DOCUMENTATION
  • 5. PHASES IN PROGRAMMING LIFE CYCLE PHASE 1 – SPECIFY THE PROBLEM • studies the problem. • investigate the need for possible software automation in the given system. • specific recommendations for the problem. Purposes:  to find the need and  to define the problem that needs to be solved.  identify the operators and  formula need to be used
  • 6. PHASES IN PROGRAMMING LIFE CYCLE PHASE 2: ANALYZE THE PROBLEM Purpose: To describe in detail a solution to a problem and information needed in solving the problem. How? Study and understand the problem. Identify: The needed input. The required output. The needed process. For example: scientific formula or particular theories.
  • 7. PHASE 2: ANALYZE THE PROBLEM In most cases, the solution requires more than one program. The analyze requirement step consist of three major task : 1. Review requirement – chart, diagram and report. 2. Meet with system analyst and user – enables the programmer to understand the purpose of requirement from the user perspective. 3. Identify input, process, output and data component. – use IPO chart. Programmer review the content of IPO Chart with system analyst and user. This allows programmers to be sure they completely understand the purpose of the program.
  • 8. PHASES IN PROGRAMMING LIFE CYCLE PHASE 3: DESIGN THE ALGORITHM Definition: It is a framework or flow that shows the steps in problem solving. Methods to design a program: 1. Algorithm 2. Flowchart 3. Pseudo code
  • 9. PHASES IN PROGRAMMING LIFE CYCLE PHASE 3: DESIGN THE ALGORITHM 1. Algorithm • Algorithm is a sequence of instructions to solve a problem, written in human language, and it can solve any problems when it is used with the correct procedure. • Example: 1. Get Input 3 numbers 2. Total up the 3 numbers using formula: Total = number1 + number2 + number3 3. Calculate average 3 number using formula; Average = (number1 + number2 + number3)/3 4. Display Total, Average
  • 10. PHASES IN PROGRAMMING LIFE CYCLE PHASE 3: DESIGN THE ALGORITHM 2. Flowchart  A graphical representation of data, information and workflow using certain symbols that are connected to flow lines to describe the instructions done in problem solving.  It shows the flow of the process from the start to the end of the problem solving.
  • 11. PHASES IN PROGRAMMING LIFE CYCLE PHASE 3: DESIGN THE ALGORITHM 2. Flowchart Basic Flowchart symbol:
  • 12. PHASES IN PROGRAMMING LIFE CYCLE PHASE 3: DESIGN THE ALGORITHM 3. Pseudo code  Steps in problem solving that is written half in programming code and half in human language.  Example: START Input number1, number2, number3; Total = number1 + number2 + number3; Average = (number1 + number2 + number3)/3 Display Total, Average; END
  • 13. PHASES IN PROGRAMMING LIFE CYCLE PHASE 4: IMPLEMENT THE ALGORITHM Definition: Writing problem solving into certain programming language such as C, COBOL and others. Problem solving: Instructions before it is coded into programming language. Purpose: To produce a program to develop a system
  • 14. PHASES IN PROGRAMMING LIFE CYCLE PHASE 4: IMPLEMENT THE ALGORITHM o Example:
  • 15. PHASES IN PROGRAMMING LIFE CYCLE PHASE 5: TEST AND VERIFY THE PROGRAM o Testing: Using a set of data to discover errors and to ensure accuracy of the program. o Diagram indicates the process of testing:
  • 16. PHASES IN PROGRAMMING LIFE CYCLE PHASE 5: TEST AND VERIFY THE PROGRAM  Debug: Debugging is a process of identifying and correcting error. o Three types of error: oSyntax error (grammatical error) oRuntime error oLogic error
  • 17. PHASES IN PROGRAMMING LIFE CYCLE PHASE 5: TEST AND VERIFY THE PROGRAM 1. Syntax error (grammatical error)  Occurs when the rules of programming language are not applied.  Correction is done during the program coding.  The bug can be traced during the compilation.  Also known as compile-time error.  Must be corrected before executing and testing the program.
  • 18. PHASES IN PROGRAMMING LIFE CYCLE PHASE 5: TEST AND VERIFY THE PROGRAM 2. Run time error  Occur when a program with no syntax error asks the computer to do something that the computer is unable to reliably do.  Example:  trying to divide by a variable that contains a value zero  trying to open a file that does not exists 3. Logic error  Cannot be traced by compiler.  Corrected during the problem solving process.  Example output for average is 4, but when it runs, the output is 2.
  • 19. PHASES IN PROGRAMMING LIFE CYCLE PHASE 6: MAINTAIN AND UPDATE THE PROGRAM Activity that verifies whether the operational system is performing as planned or an activity to modify the system to meet the current requirement. The process of changing a system after it has been applied to maintain its ability. The changes may involve simple changes such as error correcting.
  • 20. PHASES IN PROGRAMMING LIFE CYCLE PHASE 6: MAINTAIN AND UPDATE THE PROGRAM How to maintenance?  Testing – Test the ability of the system.  Measurement – Access data time. Example, time to save, print and others.  Replacement – Replace the old system to new system.  Adjustment – Adding needs to new system.  Repair – For example: An old system cannot update the new data  Updating – Update the database.
  • 21. PHASES IN PROGRAMMING LIFE CYCLE PHASE 7: DOCUMENTATION  Definition: A written or graphical report of the steps taken during the development of a program.  Purpose: It will be useful in the future, in case of modification or maintenance.
  • 22. PHASES IN PROGRAMMING LIFE CYCLE PHASE 7: DOCUMENTATION Content of documentation:  Description of the program.  Specification of program requirement  Program design such as pseudo code and flowchart  List of program and comments (to explain about the program).  Test results.  User’s manual book.  Program capabilities and limitation.