SlideShare a Scribd company logo
1 of 36
FP101
WEEK 5
CLO 1
Explain the basic computer and programming
fundamentals with appropriate examples of
language and technology
-Specify the Problem
-Analyze the problem
-Design the algorithm to solve the problem
-Implement the algorithm
-Test and verify the completed program
-Maintain and update the program
-Documentation
Programming Life Cycle
• There are 7 phases in programming Life Cycle:
Specify the Problem
Problem Statement
Compute and display the total cost apples
given the number of kilograms of apples
purchased and the cost per kilogram of
apples.
Compute and display the total price apples
given the weight in kilograms
of apples purchased and the price
per kilogram of apples.
Specify the Problem
• The first step in solving any problem is to
understand it.
• Read the requirements statement carefully.
• State the problem clearly and unambiguously.
• Gain clear understanding of what is required
for its solution.
Specify the Problem
• In problem requirement phase you may ask
some question like
a. What to compute?
b. What unit do they use?
c. Is it only for the apple or other fruit?
or any question for gaining understanding of
what is required.
Analyze the problem
• Identify the problem inputs you have to work
with and also the problems outputs (results)
desired.
• Check any additional requirements or
constraints on the solution.
• Determine the required format of the results
to be displayed.
• Develop a list of variables.
Analyze the problem
• To analyze the problem you may summarize the
information contained in it and find out the
problem input and output.
Problem Inputs
a. weight in kilogram
b. price per kilogram ( in RM per kg)
Problem Output
a. Total price (in RM)
Analyze the problem
• Develop a list of formulas that specify
relationships between the inputs and the
outputs:
Total price = price per kilogram x weight in kilogram
.
Analyze the problem
• Find a list of solution alternatives
Ex:
1. Define price per kilogram as constant
and weight in kilogram as input value
2. Define price per kilogram and weight in
kilogram as input values
Analyze the problem
• All the information gained from analyzing the
problem can be put into problem Analysis chart
(PAC)
Given Data Required Results
Weight in kilogram
Price per kilogram
Total price
Processing Required Solution Alternatives
Total price = price per
kilogram x weight in kilogram
1. Define price per kilogram as constant and
weight in kilogram as input value
*2. Define price per kilogram and weight in
kilogram as input values
Design the algorithm to solve the
problem
• Once you fully understand the problem and
have clarified any questions you have, you
need to develop your solution.
• Algorithm is a set of instructions for the
computer
• Setting up the algorithms is probably the
hardest part of problem solving on the
computer
Design the algorithm to solve the
problem
• The instructions cannot assume anything, cannot skip
steps, must be executable one step at a time and must
be complete
• Example of algorithm:
1. Input the weight in kilograms of apples
purchased and the price per kilogram of apples
2. Calculate total price apples using the formula:
Total price = price per kilogram x weight in kilogram
3. Print Total Price
Design the algorithm to solve the
problem
• Tools which can be used to help you in this task:
a) Structure Chart
b) IPO chart
c) flowchart
d) pseudocode
Design the algorithm to solve the
problem
a) Structure Chart
• Depict the overall organization of a program, show
how program segment or modules are defined and
how they relate to one another.
• The module in the upper row serve as control
functions directing the program to process modules
under them as appropriate.
• It follows a top-down design philosophy.
Design the algorithm to solve the
problem
a) Example : Structure Chart
TOTAL PRICE CONTROL
MODULE
0000
READ
1000
CALC
2000
PRINT
3000
Design the algorithm to solve the
problem
b) IPO (Input-Processing-Output) chart
- shows in more detail what data items are
input, what processing takes place on that
data and what information will be the end
result, the output
Design the algorithm to solve the
problem
b) Example : IPO (Input-Processing-Output) chart
Input processing Module reference
number
Output
Weight in kilogram
Price per kilogram
1. Enter Weight in
kilogram
2. Enter Price per
kilogram
3. Calculate Total
price
4. Print Total price
5. End
1000
1000
2000
3000
0000
Total price
Design the algorithm to solve the
problem
c) flowchart
- graphic representations of the algorithm
- shows the flow of processing from the
beginning to the end of a solution
- each block in a flowchart represents one
instruction from an algorithm
- flow lines indicate the direction of the data
flow
Design the algorithm to solve the
problem
start
Input WeightInKg, PricePerKg
TotalPrice = WeightInKg * PricePerKg
Print TotalPrice
end
c) Example : flow chart
Design the algorithm to solve the
problem
d) pseudo code
• Uses English like statements in place of the
flowchart graphical symbols.
• It is easier to code a program from it than from
flowchart.
• It is not tied to any programming language.
• It is easy to modify but not graphical, difficult to use
for logically complex problems, and slower to
create.
Design the algorithm to solve the
problem
d) Example : pseudo code
START
Input WeightInKg, PricePerKg
TotalPrice = WeightInKg * PricePerKg
Print TotalPrice
END
Implement the algorithm
• This step involves writing the algorithm as a
program.
• By using flow chart as the guideline, start
writing a program from the top of flow chart
and work your way to the bottom.
Implement the algorithm
• Example of program code in C++
#include <iostream.h>
int main()
{
float WeightInKg, PricePerKg, TotalPrice;
cout<<“ Enter weigh in Kg: “;
cin>> WeightInKg;
cout<<“ Enter price per kg: “;
cin>> PricePerKg;
TotalPrice= WeightInKg * PricePerKg;
cout<<“ Price of apples : RM “<<TotalPrice;
return 0;
}
Test and verify the completed
program
• After writing the program, you must test it.
• Program testing can be a very tedious and
time consuming.
• Run the program several times using the
different sets of data.
• Make sure that it works correctly for every
situation provided in the algorithm.
• Example: Blackbox Testing or Whitebox
testing.
Test and verify the completed
program
• Blackbox testing gets its name from the
concept of testing the program without
knowing what is inside- without knowing how
its works. By a user.
• Whitebox testing assumes that the tester
knows everything about the program. It is a
programmer’s responsibility.
Test and verify the completed
program
• Errors are so common that they have a special
name (BUGS). Bugs must be identified and
corrected.
• The process of identifying and correcting bugs
is known as debugging.
• When the compiler detects an error, the
computer will display an error message, which
indicates that you have made a mistake and
what the cause of the error might be.
Test and verify the completed
program
• Types of error in programming
- Syntax Error / Compiler Error
- Run-Time Error
- Logical Error
Test and verify the completed
program
• Syntax Error (Compilation Error)
– An error in the format of a statement in a
computer program that violates the rules of
the programming language employed.
– A program will not be executed until all syntax
errors are corrected
– Error can be traced at the event of compilation
Test and verify the completed
program
• Run –time error
– Are detected by the computer and are displayed
during execution of a program.
– A run-time error occurs when the program directs
the computer to perform an illegal operation,
such as dividing a number by zero or
Test and verify the completed
program
• Logical Error
– The hardest errors to find and fix.
– A logic error means although the language syntax
was used correctly, there was a misunderstanding:
if you want a, where b=c+a and you give a = b-a
instead of a = b-c, then you will get the wrong
answer, but have used the correct language
syntax.
Maintain and Update the program
• Maintenance and update are the modification
of a software product after delivery to correct
faults, to improve performance or other
attributes, or to adapt the product to a
modified environment.
Maintain and Update the program
• Types of maintenance
a) Corrective maintenance
- Reactive modification of a software
product performed after delivery to correct discovered
problems. It deals with fixing bugs in the code.
b) Adaptive maintenance
-Modification of a software product
performed after delivery to keep a software
product usable in a changed or changing
environment. It deals with adapting the
software to new environments.
Maintain and Update the program
• Types of maintenance
a) Perfective maintenance
-Modification of a software product after delivery to
improve performance or maintainability. It deals
with updating the software according to changes in
user requirements.
b) Preventive maintenance
-Modification of a software product after
delivery to detect and correct latent faults in
the software product before they become
effective faults. It deals with updating
documentation and making the software more
maintainable.
Documentation
• documentation should be concise so the person who
reads it doesn't have to spend too much time to find
what he or she is looking for.
• There are two types of documentation
a) internal documentation
- The comments you put in your source
code files should be written to help other
programmers navigate through your code
easily in order to find bugs or to determine
where to add new features.
Documentation
• There are two types of documentation
b) external documentation
-is made up of the manuals written about the
solution
-is written text that accompanies computer
software. It either explains how it operates or
how to use it, and may mean different things to
people in different roles.

More Related Content

What's hot

Komponen asas komputer
Komponen asas komputerKomponen asas komputer
Komponen asas komputerLekha Lekzz
 
Algoritma ASK Tingkatan 1
Algoritma ASK Tingkatan 1Algoritma ASK Tingkatan 1
Algoritma ASK Tingkatan 1zamarezam
 
Reka Bentuk & Teknologi : Bab 2 pengurusan projek
Reka Bentuk & Teknologi : Bab 2 pengurusan projekReka Bentuk & Teknologi : Bab 2 pengurusan projek
Reka Bentuk & Teknologi : Bab 2 pengurusan projekMaz Ina
 
Pengenalan Robotik (RBT3073 Teknologi Elektrik dan Elektronik)
Pengenalan Robotik (RBT3073 Teknologi Elektrik dan Elektronik)Pengenalan Robotik (RBT3073 Teknologi Elektrik dan Elektronik)
Pengenalan Robotik (RBT3073 Teknologi Elektrik dan Elektronik)Eunice Lee
 
2.0 algoritma pseudokod carta alir
2.0 algoritma pseudokod carta alir2.0 algoritma pseudokod carta alir
2.0 algoritma pseudokod carta alirSakinah Hassan
 
5 maksud dan jenis perisian
5 maksud dan jenis perisian5 maksud dan jenis perisian
5 maksud dan jenis perisianwazi musa
 
135371125 kaedah-asas-membaca-bahasa-melayu
135371125 kaedah-asas-membaca-bahasa-melayu135371125 kaedah-asas-membaca-bahasa-melayu
135371125 kaedah-asas-membaca-bahasa-melayuAthiletchumy Ramudu
 
Kitar hayat pembangunan aturcara / sistem
Kitar hayat pembangunan aturcara / sistemKitar hayat pembangunan aturcara / sistem
Kitar hayat pembangunan aturcara / sistemNaveen Segaran
 
Modul tmk tahun 6 modul 2 - menggunakan algoritma melalui pseudokod dan carta...
Modul tmk tahun 6 modul 2 - menggunakan algoritma melalui pseudokod dan carta...Modul tmk tahun 6 modul 2 - menggunakan algoritma melalui pseudokod dan carta...
Modul tmk tahun 6 modul 2 - menggunakan algoritma melalui pseudokod dan carta...amiraiman_11
 
Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)
Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)
Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)Khairi Aiman
 
Proses kawalan
Proses kawalanProses kawalan
Proses kawalanwan izzati
 
BUKU TEKS RBT Tingkatan 1
BUKU TEKS RBT Tingkatan 1BUKU TEKS RBT Tingkatan 1
BUKU TEKS RBT Tingkatan 1Fadhirul Fitri
 
hamparan elektronik
hamparan elektronikhamparan elektronik
hamparan elektronikAyubkhan Kks
 
2.1 sistem nombor perduaan
2.1 sistem nombor perduaan2.1 sistem nombor perduaan
2.1 sistem nombor perduaantinalisalokman
 
Konsep Dan Asas Pengaturcaraan
Konsep Dan Asas PengaturcaraanKonsep Dan Asas Pengaturcaraan
Konsep Dan Asas Pengaturcaraanask3areu
 
Pengenalan Perisian Komputer
Pengenalan Perisian KomputerPengenalan Perisian Komputer
Pengenalan Perisian KomputerYusrinaldiibrahim
 
Perisian Aplikasi vs Perisian Sistem dan Ingatan Utama vs Storan Sekunder
Perisian Aplikasi vs Perisian Sistem dan Ingatan Utama vs Storan SekunderPerisian Aplikasi vs Perisian Sistem dan Ingatan Utama vs Storan Sekunder
Perisian Aplikasi vs Perisian Sistem dan Ingatan Utama vs Storan SekunderGomaze Lang
 

What's hot (20)

Komponen asas komputer
Komponen asas komputerKomponen asas komputer
Komponen asas komputer
 
Algoritma ASK Tingkatan 1
Algoritma ASK Tingkatan 1Algoritma ASK Tingkatan 1
Algoritma ASK Tingkatan 1
 
Reka Bentuk & Teknologi : Bab 2 pengurusan projek
Reka Bentuk & Teknologi : Bab 2 pengurusan projekReka Bentuk & Teknologi : Bab 2 pengurusan projek
Reka Bentuk & Teknologi : Bab 2 pengurusan projek
 
Pengenalan Robotik (RBT3073 Teknologi Elektrik dan Elektronik)
Pengenalan Robotik (RBT3073 Teknologi Elektrik dan Elektronik)Pengenalan Robotik (RBT3073 Teknologi Elektrik dan Elektronik)
Pengenalan Robotik (RBT3073 Teknologi Elektrik dan Elektronik)
 
2.0 algoritma pseudokod carta alir
2.0 algoritma pseudokod carta alir2.0 algoritma pseudokod carta alir
2.0 algoritma pseudokod carta alir
 
Kata Kerja Transitif P4
Kata Kerja Transitif P4Kata Kerja Transitif P4
Kata Kerja Transitif P4
 
5 maksud dan jenis perisian
5 maksud dan jenis perisian5 maksud dan jenis perisian
5 maksud dan jenis perisian
 
135371125 kaedah-asas-membaca-bahasa-melayu
135371125 kaedah-asas-membaca-bahasa-melayu135371125 kaedah-asas-membaca-bahasa-melayu
135371125 kaedah-asas-membaca-bahasa-melayu
 
Kitar hayat pembangunan aturcara / sistem
Kitar hayat pembangunan aturcara / sistemKitar hayat pembangunan aturcara / sistem
Kitar hayat pembangunan aturcara / sistem
 
Modul tmk tahun 6 modul 2 - menggunakan algoritma melalui pseudokod dan carta...
Modul tmk tahun 6 modul 2 - menggunakan algoritma melalui pseudokod dan carta...Modul tmk tahun 6 modul 2 - menggunakan algoritma melalui pseudokod dan carta...
Modul tmk tahun 6 modul 2 - menggunakan algoritma melalui pseudokod dan carta...
 
Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)
Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)
Pengaturcaraan C++ - Permarkahan (C++ Programming - Scores)
 
Ayat
AyatAyat
Ayat
 
Proses kawalan
Proses kawalanProses kawalan
Proses kawalan
 
BUKU TEKS RBT Tingkatan 1
BUKU TEKS RBT Tingkatan 1BUKU TEKS RBT Tingkatan 1
BUKU TEKS RBT Tingkatan 1
 
hamparan elektronik
hamparan elektronikhamparan elektronik
hamparan elektronik
 
2.1 sistem nombor perduaan
2.1 sistem nombor perduaan2.1 sistem nombor perduaan
2.1 sistem nombor perduaan
 
Konsep Dan Asas Pengaturcaraan
Konsep Dan Asas PengaturcaraanKonsep Dan Asas Pengaturcaraan
Konsep Dan Asas Pengaturcaraan
 
Pengenalan Perisian Komputer
Pengenalan Perisian KomputerPengenalan Perisian Komputer
Pengenalan Perisian Komputer
 
Perisian Aplikasi vs Perisian Sistem dan Ingatan Utama vs Storan Sekunder
Perisian Aplikasi vs Perisian Sistem dan Ingatan Utama vs Storan SekunderPerisian Aplikasi vs Perisian Sistem dan Ingatan Utama vs Storan Sekunder
Perisian Aplikasi vs Perisian Sistem dan Ingatan Utama vs Storan Sekunder
 
Laporan tugasan kumpulan
Laporan tugasan kumpulanLaporan tugasan kumpulan
Laporan tugasan kumpulan
 

Similar to 2.2 Demonstrate the understanding of Programming Life Cycle

C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing TechniquesAppili Vamsi Krishna
 
Programs_Problem_Solving_Algorithms.ppt
Programs_Problem_Solving_Algorithms.pptPrograms_Problem_Solving_Algorithms.ppt
Programs_Problem_Solving_Algorithms.pptmalik681299
 
part_1 (1).ppt
part_1 (1).pptpart_1 (1).ppt
part_1 (1).pptlekha572836
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfMMRF2
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdfMIT,Imphal
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)praveena p
 
CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.pptTekle12
 
01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptxssuser586772
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem slovingMani Kandan
 
Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptxshoaibkhan716300
 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CPrabu U
 
Chapter 2(1)
Chapter 2(1)Chapter 2(1)
Chapter 2(1)TejaswiB4
 
Lecture1
Lecture1Lecture1
Lecture1Andrew Raj
 
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESC LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESHarshJha34
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdfNayanChandak1
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17manjurkts
 
Part 1.ppt
Part 1.pptPart 1.ppt
Part 1.pptRAJESH S
 

Similar to 2.2 Demonstrate the understanding of Programming Life Cycle (20)

C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 
Programs_Problem_Solving_Algorithms.ppt
Programs_Problem_Solving_Algorithms.pptPrograms_Problem_Solving_Algorithms.ppt
Programs_Problem_Solving_Algorithms.ppt
 
part_1 (1).ppt
part_1 (1).pptpart_1 (1).ppt
part_1 (1).ppt
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
 
CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.ppt
 
01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx
 
Module 1 python.pptx
Module 1 python.pptxModule 1 python.pptx
Module 1 python.pptx
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem sloving
 
Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptx
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to C
 
Chapter 2(1)
Chapter 2(1)Chapter 2(1)
Chapter 2(1)
 
Lecture1
Lecture1Lecture1
Lecture1
 
Cse
CseCse
Cse
 
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESC LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdf
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17
 
Part 1.ppt
Part 1.pptPart 1.ppt
Part 1.ppt
 

More from Frankie Jones

Dbm2013 engineering mathematics 3 june 2017
Dbm2013  engineering mathematics 3 june 2017Dbm2013  engineering mathematics 3 june 2017
Dbm2013 engineering mathematics 3 june 2017Frankie Jones
 
Basic concepts of information technology and the internet
Basic concepts of information technology and the internetBasic concepts of information technology and the internet
Basic concepts of information technology and the internetFrankie Jones
 
2.1 Understand problem solving concept
2.1 Understand problem solving concept2.1 Understand problem solving concept
2.1 Understand problem solving conceptFrankie Jones
 
2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problemFrankie Jones
 
Introduction to programming principles languages
Introduction to programming principles languagesIntroduction to programming principles languages
Introduction to programming principles languagesFrankie Jones
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGFrankie Jones
 
Chapter 3 Computer Organization
Chapter 3 Computer OrganizationChapter 3 Computer Organization
Chapter 3 Computer OrganizationFrankie Jones
 
Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Frankie Jones
 
Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Frankie Jones
 
Chapter 1 computer hardware and flow of information
Chapter 1 computer hardware and flow of informationChapter 1 computer hardware and flow of information
Chapter 1 computer hardware and flow of informationFrankie Jones
 
Operator precedence
Operator precedenceOperator precedence
Operator precedenceFrankie Jones
 
Type header file in c++ and its function
Type header file in c++ and its functionType header file in c++ and its function
Type header file in c++ and its functionFrankie Jones
 
Multimedia storyboard template
Multimedia storyboard templateMultimedia storyboard template
Multimedia storyboard templateFrankie Jones
 
Occupancy calculation form
Occupancy calculation formOccupancy calculation form
Occupancy calculation formFrankie Jones
 

More from Frankie Jones (14)

Dbm2013 engineering mathematics 3 june 2017
Dbm2013  engineering mathematics 3 june 2017Dbm2013  engineering mathematics 3 june 2017
Dbm2013 engineering mathematics 3 june 2017
 
Basic concepts of information technology and the internet
Basic concepts of information technology and the internetBasic concepts of information technology and the internet
Basic concepts of information technology and the internet
 
2.1 Understand problem solving concept
2.1 Understand problem solving concept2.1 Understand problem solving concept
2.1 Understand problem solving concept
 
2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem
 
Introduction to programming principles languages
Introduction to programming principles languagesIntroduction to programming principles languages
Introduction to programming principles languages
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
 
Chapter 3 Computer Organization
Chapter 3 Computer OrganizationChapter 3 Computer Organization
Chapter 3 Computer Organization
 
Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)
 
Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)
 
Chapter 1 computer hardware and flow of information
Chapter 1 computer hardware and flow of informationChapter 1 computer hardware and flow of information
Chapter 1 computer hardware and flow of information
 
Operator precedence
Operator precedenceOperator precedence
Operator precedence
 
Type header file in c++ and its function
Type header file in c++ and its functionType header file in c++ and its function
Type header file in c++ and its function
 
Multimedia storyboard template
Multimedia storyboard templateMultimedia storyboard template
Multimedia storyboard template
 
Occupancy calculation form
Occupancy calculation formOccupancy calculation form
Occupancy calculation form
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

2.2 Demonstrate the understanding of Programming Life Cycle

  • 2. WEEK 5 CLO 1 Explain the basic computer and programming fundamentals with appropriate examples of language and technology
  • 3. -Specify the Problem -Analyze the problem -Design the algorithm to solve the problem -Implement the algorithm -Test and verify the completed program -Maintain and update the program -Documentation Programming Life Cycle • There are 7 phases in programming Life Cycle:
  • 4. Specify the Problem Problem Statement Compute and display the total cost apples given the number of kilograms of apples purchased and the cost per kilogram of apples. Compute and display the total price apples given the weight in kilograms of apples purchased and the price per kilogram of apples.
  • 5. Specify the Problem • The first step in solving any problem is to understand it. • Read the requirements statement carefully. • State the problem clearly and unambiguously. • Gain clear understanding of what is required for its solution.
  • 6. Specify the Problem • In problem requirement phase you may ask some question like a. What to compute? b. What unit do they use? c. Is it only for the apple or other fruit? or any question for gaining understanding of what is required.
  • 7. Analyze the problem • Identify the problem inputs you have to work with and also the problems outputs (results) desired. • Check any additional requirements or constraints on the solution. • Determine the required format of the results to be displayed. • Develop a list of variables.
  • 8. Analyze the problem • To analyze the problem you may summarize the information contained in it and find out the problem input and output. Problem Inputs a. weight in kilogram b. price per kilogram ( in RM per kg) Problem Output a. Total price (in RM)
  • 9. Analyze the problem • Develop a list of formulas that specify relationships between the inputs and the outputs: Total price = price per kilogram x weight in kilogram .
  • 10. Analyze the problem • Find a list of solution alternatives Ex: 1. Define price per kilogram as constant and weight in kilogram as input value 2. Define price per kilogram and weight in kilogram as input values
  • 11. Analyze the problem • All the information gained from analyzing the problem can be put into problem Analysis chart (PAC) Given Data Required Results Weight in kilogram Price per kilogram Total price Processing Required Solution Alternatives Total price = price per kilogram x weight in kilogram 1. Define price per kilogram as constant and weight in kilogram as input value *2. Define price per kilogram and weight in kilogram as input values
  • 12. Design the algorithm to solve the problem • Once you fully understand the problem and have clarified any questions you have, you need to develop your solution. • Algorithm is a set of instructions for the computer • Setting up the algorithms is probably the hardest part of problem solving on the computer
  • 13. Design the algorithm to solve the problem • The instructions cannot assume anything, cannot skip steps, must be executable one step at a time and must be complete • Example of algorithm: 1. Input the weight in kilograms of apples purchased and the price per kilogram of apples 2. Calculate total price apples using the formula: Total price = price per kilogram x weight in kilogram 3. Print Total Price
  • 14. Design the algorithm to solve the problem • Tools which can be used to help you in this task: a) Structure Chart b) IPO chart c) flowchart d) pseudocode
  • 15. Design the algorithm to solve the problem a) Structure Chart • Depict the overall organization of a program, show how program segment or modules are defined and how they relate to one another. • The module in the upper row serve as control functions directing the program to process modules under them as appropriate. • It follows a top-down design philosophy.
  • 16. Design the algorithm to solve the problem a) Example : Structure Chart TOTAL PRICE CONTROL MODULE 0000 READ 1000 CALC 2000 PRINT 3000
  • 17. Design the algorithm to solve the problem b) IPO (Input-Processing-Output) chart - shows in more detail what data items are input, what processing takes place on that data and what information will be the end result, the output
  • 18. Design the algorithm to solve the problem b) Example : IPO (Input-Processing-Output) chart Input processing Module reference number Output Weight in kilogram Price per kilogram 1. Enter Weight in kilogram 2. Enter Price per kilogram 3. Calculate Total price 4. Print Total price 5. End 1000 1000 2000 3000 0000 Total price
  • 19. Design the algorithm to solve the problem c) flowchart - graphic representations of the algorithm - shows the flow of processing from the beginning to the end of a solution - each block in a flowchart represents one instruction from an algorithm - flow lines indicate the direction of the data flow
  • 20. Design the algorithm to solve the problem start Input WeightInKg, PricePerKg TotalPrice = WeightInKg * PricePerKg Print TotalPrice end c) Example : flow chart
  • 21. Design the algorithm to solve the problem d) pseudo code • Uses English like statements in place of the flowchart graphical symbols. • It is easier to code a program from it than from flowchart. • It is not tied to any programming language. • It is easy to modify but not graphical, difficult to use for logically complex problems, and slower to create.
  • 22. Design the algorithm to solve the problem d) Example : pseudo code START Input WeightInKg, PricePerKg TotalPrice = WeightInKg * PricePerKg Print TotalPrice END
  • 23. Implement the algorithm • This step involves writing the algorithm as a program. • By using flow chart as the guideline, start writing a program from the top of flow chart and work your way to the bottom.
  • 24. Implement the algorithm • Example of program code in C++ #include <iostream.h> int main() { float WeightInKg, PricePerKg, TotalPrice; cout<<“ Enter weigh in Kg: “; cin>> WeightInKg; cout<<“ Enter price per kg: “; cin>> PricePerKg; TotalPrice= WeightInKg * PricePerKg; cout<<“ Price of apples : RM “<<TotalPrice; return 0; }
  • 25. Test and verify the completed program • After writing the program, you must test it. • Program testing can be a very tedious and time consuming. • Run the program several times using the different sets of data. • Make sure that it works correctly for every situation provided in the algorithm. • Example: Blackbox Testing or Whitebox testing.
  • 26. Test and verify the completed program • Blackbox testing gets its name from the concept of testing the program without knowing what is inside- without knowing how its works. By a user. • Whitebox testing assumes that the tester knows everything about the program. It is a programmer’s responsibility.
  • 27. Test and verify the completed program • Errors are so common that they have a special name (BUGS). Bugs must be identified and corrected. • The process of identifying and correcting bugs is known as debugging. • When the compiler detects an error, the computer will display an error message, which indicates that you have made a mistake and what the cause of the error might be.
  • 28. Test and verify the completed program • Types of error in programming - Syntax Error / Compiler Error - Run-Time Error - Logical Error
  • 29. Test and verify the completed program • Syntax Error (Compilation Error) – An error in the format of a statement in a computer program that violates the rules of the programming language employed. – A program will not be executed until all syntax errors are corrected – Error can be traced at the event of compilation
  • 30. Test and verify the completed program • Run –time error – Are detected by the computer and are displayed during execution of a program. – A run-time error occurs when the program directs the computer to perform an illegal operation, such as dividing a number by zero or
  • 31. Test and verify the completed program • Logical Error – The hardest errors to find and fix. – A logic error means although the language syntax was used correctly, there was a misunderstanding: if you want a, where b=c+a and you give a = b-a instead of a = b-c, then you will get the wrong answer, but have used the correct language syntax.
  • 32. Maintain and Update the program • Maintenance and update are the modification of a software product after delivery to correct faults, to improve performance or other attributes, or to adapt the product to a modified environment.
  • 33. Maintain and Update the program • Types of maintenance a) Corrective maintenance - Reactive modification of a software product performed after delivery to correct discovered problems. It deals with fixing bugs in the code. b) Adaptive maintenance -Modification of a software product performed after delivery to keep a software product usable in a changed or changing environment. It deals with adapting the software to new environments.
  • 34. Maintain and Update the program • Types of maintenance a) Perfective maintenance -Modification of a software product after delivery to improve performance or maintainability. It deals with updating the software according to changes in user requirements. b) Preventive maintenance -Modification of a software product after delivery to detect and correct latent faults in the software product before they become effective faults. It deals with updating documentation and making the software more maintainable.
  • 35. Documentation • documentation should be concise so the person who reads it doesn't have to spend too much time to find what he or she is looking for. • There are two types of documentation a) internal documentation - The comments you put in your source code files should be written to help other programmers navigate through your code easily in order to find bugs or to determine where to add new features.
  • 36. Documentation • There are two types of documentation b) external documentation -is made up of the manuals written about the solution -is written text that accompanies computer software. It either explains how it operates or how to use it, and may mean different things to people in different roles.