SlideShare a Scribd company logo
Universiti Tun Hussien Onn Malaysia Faculty of Mechanical and Manufacturing Engineering
Scenarios in real life ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Program Design Method
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Example 2: Money withdrawal algorithm Program Design Method
Algorithm Techniques Pseudocode Flowchart Program Design Method
A text-based design tool that helps programmers to develop algorithm Pseudocode Compact and informal high level  language description of a computer programming algorithm Simple codes which resembles program code that will be written during implementation phase (program coding) Program Design Method Using natural language (communication language e.g: Malay/English) wording phrase
Pseudocode RULES Program Design Method ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Program Design Method Examples
if student's  grade  is greater than or equal to 60  print the statement "passed"  else  print the statement  "failed"  Examples Keyword ? print means display on the screen monitor if  credit_card_number  is valid  execute transaction based on number and order  else  show a generic failure message show also means display on the screen monitor Program Design Method
Set  total  to zero  Set  grade_counter  to one  While  grade_counter  is less than or equal to ten  Input the next  grade Add the  grade  into the  total  Set the  class_average  to the  total  divided by ten  Print the  class_average .  Examples Keyword? set  means assign the value,e.g: total = 0 while  is used whenever the process is to be continued Program Design Method
Pseudocode ,[object Object],[object Object],[object Object],[object Object],[object Object],How? Chapter 1 Program Design Method
Problem example Input Value of   x   and   a Process Replace the value of   x   and   a   in the formula, y = 2x +a -6 Output The value of the equation,   y Identify the problem Chapter 1 Program Design Method Example 1:
Given the value of  x  is 10 and  a  is 12,  find the result of the following equation: y = 2x + a - 6 Example 1 start read the value of  x read the value of  a compute the value of  y  as y = 2x + a -6 display/print  the result (or the value of  y ) end Pseudocode Write a program! Keyword Program Design Method
Uncle Degawan wants to buy 5 tins of paint from  Cinda’s shop. The price of each tin of the paint is  RM 15.60. Calculate the price which Uncle Degawan have to pay for all the tin of paints he bought. start read the  amount_of_paint compute the  total_price  as  price_per_tin  times by  amount_of  _paint display/print  the result (or the  total_price ) end Pseudocode Write a program! Keyword? Program Design Method
start read the student  mark if  mark  is greater than 85 and  mark  is less than 100, then set  grade  as A display/print the  grade end Pseudocode Keyword Keyword Keyword Program Design Method
start Set  total  to zero Set  grade counter  to one While  grade   counter  is less than or equal to ten input the next  grade add the  grade  into the  total add one to the  grade counter Set the class  average  to the  total  divided by  ten Print the class  average end Pseudocode Keyword Keyword Keyword Program Design Method
Question Program Design Method
Flowchart Schematic representation of an algorithm or process ,[object Object],[object Object],Use symbols to represent the steps Chapter 1b Program Design Method
Flowchart Symbols Chapter 1b Program Design Method Start/Stop (oval) The terminator symbol marks the starting or ending point of the system. It usually contains the word "Start" or "End."   Action or Process (rectangle) A box can represent a single step ("add two cups of flour"), or and entire sub-process ("make bread") within a larger process.
Flowchart Symbols Chapter 1 Program Design Method Decision (Diamond) A decision or branching point. Lines representing different decisions emerge from different points of the diamond.   Input/Output (Parallelogram) Represents material or information entering or leaving the system, such as customer order (input) or a product (output).
Flowchart Symbols Chapter 1 Program Design Method Flow Lines Lines indicate the sequence of steps and the direction of flow.  On-Page Connector Indicates that the flow continues where a matching symbol (containing the same letter) has been placed in the same page.
Flowchart Symbols Chapter 1 Program Design Method Off-Page Connector Indicates that the process continues on another page. Database / Disk Storage Input-Output Symbol Indicates input from or output to disk storage.
Flowchart Example Chapter 1 Program Design Method
Example What software use to draw flowchart? You can use Ms Word >  AutoShapes> Flowchart or other flowchart drawing tools  e.g: SmartDraw/Visio Drawing, Rational Rose,etc. Flowchart Chapter 1 Program Design Method
Chapter 1 Program Design Method Pseudocode and Flowchart Convention ,[object Object],[object Object],begin Statement_1 Statement_2 … Statement_n end Statement 1 Statement 2 Statement..n
Flowchart Example Chapter 1 Program Design Method Read  x Read  a y = 2x + a - 6 Display  y Start End
Chapter 1 Program Design Method Pseudo code and Flowchart Convention ,[object Object],[object Object],[object Object]
Flowchart Chapter 1 Program Design Method Pseudocode ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Program Design Method ,[object Object],[object Object],[object Object],while condition loop-body end_while Pseudo code and Flowchart Convention
start Set  total  to zero Set  grade_counter  to one While  grade _ counter  is less than or equal to ten input the next  grade add the  grade  into the  total add one to the  grade_counter Set the class  average  to the  total  divided by  ten Print the class  average end Pseudocode Chapter 1 Program Design Method Flowchart How ?
start read the  amount_of_paint compute the  total_price  as  price_per_tin  times by  amount_of  paint display/print  the result (or the  total price ) end start read the student  mark if  mark  is greater than 85 and  mark  is less than 100, then set  grade  as A display/print the  grade end Try yourself! Convert to flowchar Convert to flowchart Chapter 1 Program Design Method
A box has height, width and length.  Write the  pseudo code to calculate the volume  of a box. Write the pseudo code to calculate salary of  an employee for a month. Convert to Convert to flowchart Try yourself! Program Design Method
Question Chapter 1 Program Design Method

More Related Content

What's hot

3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
Rohit Shrivastava
 
Programing Fundamental
Programing FundamentalPrograming Fundamental
Programing Fundamental
Qazi Shahzad Ali
 
Algorithms and flowcharts ppt (seminar presentation)..
 Algorithms and flowcharts  ppt (seminar presentation).. Algorithms and flowcharts  ppt (seminar presentation)..
Algorithms and flowcharts ppt (seminar presentation)..
Nagendra N
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
DHANIK VIKRANT
 
algo
algoalgo
algo
Rao Khan
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithem
ehsanullah786
 
Algorithms and flowcharts by Haseeb Khan
Algorithms and flowcharts by Haseeb KhanAlgorithms and flowcharts by Haseeb Khan
Algorithms and flowcharts by Haseeb Khan
Haseeb Shalmani
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowchartskhair20
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1luhkahreth
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
Emmanuel Alimpolos
 
Algorithms and how to write an algorithms
Algorithms and how to write an algorithmsAlgorithms and how to write an algorithms
Algorithms and how to write an algorithms
Ahmed Nobi
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1rajnidhiman
 
Introduction to Algorithms & flow charts
Introduction to Algorithms & flow chartsIntroduction to Algorithms & flow charts
Introduction to Algorithms & flow charts
Yash Gupta
 
8.1 alogorithm & prolem solving
8.1 alogorithm & prolem solving8.1 alogorithm & prolem solving
8.1 alogorithm & prolem solvingKhan Yousafzai
 
Program design techniques
Program design techniquesProgram design techniques
Program design techniques
fika sweety
 
Best Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing TechniquesBest Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing Techniques
Tech
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Rabin BK
 
Unit 3 Foc
Unit  3 FocUnit  3 Foc
Unit 3 Foc
JAYA
 

What's hot (20)

3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
 
Programing Fundamental
Programing FundamentalPrograming Fundamental
Programing Fundamental
 
Algorithms and flowcharts ppt (seminar presentation)..
 Algorithms and flowcharts  ppt (seminar presentation).. Algorithms and flowcharts  ppt (seminar presentation)..
Algorithms and flowcharts ppt (seminar presentation)..
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
 
algo
algoalgo
algo
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithem
 
Algorithms and flowcharts by Haseeb Khan
Algorithms and flowcharts by Haseeb KhanAlgorithms and flowcharts by Haseeb Khan
Algorithms and flowcharts by Haseeb Khan
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Algorithm & flow chart
Algorithm & flow chartAlgorithm & flow chart
Algorithm & flow chart
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Algorithms and how to write an algorithms
Algorithms and how to write an algorithmsAlgorithms and how to write an algorithms
Algorithms and how to write an algorithms
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Introduction to Algorithms & flow charts
Introduction to Algorithms & flow chartsIntroduction to Algorithms & flow charts
Introduction to Algorithms & flow charts
 
8.1 alogorithm & prolem solving
8.1 alogorithm & prolem solving8.1 alogorithm & prolem solving
8.1 alogorithm & prolem solving
 
Program design techniques
Program design techniquesProgram design techniques
Program design techniques
 
Best Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing TechniquesBest Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing Techniques
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Unit 3 Foc
Unit  3 FocUnit  3 Foc
Unit 3 Foc
 
Writing algorithms
Writing algorithmsWriting algorithms
Writing algorithms
 

Viewers also liked

Management information system mordern perspective
Management information system mordern perspectiveManagement information system mordern perspective
Management information system mordern perspective
Yekini Nureni
 
Bti1022 lab sheet 8
Bti1022 lab sheet 8Bti1022 lab sheet 8
Bti1022 lab sheet 8alish sha
 
Bahan kuiz p2 27 march
Bahan kuiz p2 27 marchBahan kuiz p2 27 march
Bahan kuiz p2 27 marchnm170209
 
Books to Read
Books to ReadBooks to Read
Books to Readnplisko
 
Ways of looking 2
Ways of looking 2Ways of looking 2
Ways of looking 2amandakane1
 
Attn list test
Attn list testAttn list test
Attn list testalish sha
 
Roda + Fields Business System Presentation 041511 Copy
Roda + Fields Business System Presentation 041511 CopyRoda + Fields Business System Presentation 041511 Copy
Roda + Fields Business System Presentation 041511 Copy
Rodan + Fields Dermatologists
 
تأثير تقنية الاتصال الشخصي على الشباب
تأثير تقنية الاتصال الشخصي على الشبابتأثير تقنية الاتصال الشخصي على الشباب
تأثير تقنية الاتصال الشخصي على الشباب
haya5
 
TiemTapHoa
TiemTapHoaTiemTapHoa
TiemTapHoa
Linh Vo
 
Bti1022 lab sheet 7
Bti1022 lab sheet 7Bti1022 lab sheet 7
Bti1022 lab sheet 7alish sha
 
3 keuzes
3 keuzes3 keuzes
3 keuzes
Dandy1979
 
Rediscover india
Rediscover indiaRediscover india
Rediscover india
Ikjot Sodhi
 
Literary Terms
Literary Terms Literary Terms
Literary Terms
Ysamar Sánchez D
 

Viewers also liked (20)

Management information system mordern perspective
Management information system mordern perspectiveManagement information system mordern perspective
Management information system mordern perspective
 
Bti1022 lab sheet 8
Bti1022 lab sheet 8Bti1022 lab sheet 8
Bti1022 lab sheet 8
 
Bahan kuiz p2 27 march
Bahan kuiz p2 27 marchBahan kuiz p2 27 march
Bahan kuiz p2 27 march
 
Presentation2
Presentation2Presentation2
Presentation2
 
Books to Read
Books to ReadBooks to Read
Books to Read
 
Ways of looking 2
Ways of looking 2Ways of looking 2
Ways of looking 2
 
Attn list test
Attn list testAttn list test
Attn list test
 
Roda + Fields Business System Presentation 041511 Copy
Roda + Fields Business System Presentation 041511 CopyRoda + Fields Business System Presentation 041511 Copy
Roda + Fields Business System Presentation 041511 Copy
 
تأثير تقنية الاتصال الشخصي على الشباب
تأثير تقنية الاتصال الشخصي على الشبابتأثير تقنية الاتصال الشخصي على الشباب
تأثير تقنية الاتصال الشخصي على الشباب
 
Materiales
MaterialesMateriales
Materiales
 
TiemTapHoa
TiemTapHoaTiemTapHoa
TiemTapHoa
 
Bti1022 lab sheet 7
Bti1022 lab sheet 7Bti1022 lab sheet 7
Bti1022 lab sheet 7
 
Let's Enjoy Our Vacation
Let's Enjoy Our VacationLet's Enjoy Our Vacation
Let's Enjoy Our Vacation
 
3 keuzes
3 keuzes3 keuzes
3 keuzes
 
WLC AAR
WLC AARWLC AAR
WLC AAR
 
Rediscover india
Rediscover indiaRediscover india
Rediscover india
 
Literary Terms
Literary Terms Literary Terms
Literary Terms
 
الأسبوع السابع
الأسبوع السابعالأسبوع السابع
الأسبوع السابع
 
تعليمات السلامة
تعليمات السلامةتعليمات السلامة
تعليمات السلامة
 
Tema 2 cmc
Tema 2 cmcTema 2 cmc
Tema 2 cmc
 

Similar to Copy of dti2143/dam31303 chap 1 problem solving and program design

Chapter 2- Prog101.ppt
Chapter 2- Prog101.pptChapter 2- Prog101.ppt
Chapter 2- Prog101.ppt
JosephObadiahTuray
 
Class 7 lecture notes
Class 7 lecture notesClass 7 lecture notes
Class 7 lecture notes
Stephen Parsons
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
SusieMaestre1
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchartlotlot
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
Trivuz ত্রিভুজ
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
moazwinner
 
Software develop....
Software develop.... Software develop....
Software develop....
GCWUS
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
ReshuReshma8
 
Class 8 Lecture Notes
Class 8 Lecture NotesClass 8 Lecture Notes
Class 8 Lecture Notes
Stephen Parsons
 
learn computer science.ppt
learn computer science.pptlearn computer science.ppt
learn computer science.ppt
faithola1
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software developmentHattori Sidek
 
Lesson 3
Lesson 3Lesson 3
Algorithm
AlgorithmAlgorithm
Algorithm
Cambriannews
 
ALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdfALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdf
meychu1
 
Algorithms and Flowchart.ppt
Algorithms and Flowchart.pptAlgorithms and Flowchart.ppt
Algorithms and Flowchart.ppt
MsKGowriDhilipkumar
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
MMRF2
 
2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx
ssuser4d77b2
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
umardanjumamaiwada
 

Similar to Copy of dti2143/dam31303 chap 1 problem solving and program design (20)

Chap3
Chap3Chap3
Chap3
 
Chapter 2- Prog101.ppt
Chapter 2- Prog101.pptChapter 2- Prog101.ppt
Chapter 2- Prog101.ppt
 
Class 7 lecture notes
Class 7 lecture notesClass 7 lecture notes
Class 7 lecture notes
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
 
Software develop....
Software develop.... Software develop....
Software develop....
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
 
Class 8 Lecture Notes
Class 8 Lecture NotesClass 8 Lecture Notes
Class 8 Lecture Notes
 
learn computer science.ppt
learn computer science.pptlearn computer science.ppt
learn computer science.ppt
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
 
Lesson 3
Lesson 3Lesson 3
Lesson 3
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
ALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdfALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdf
 
Algorithms and Flowchart.ppt
Algorithms and Flowchart.pptAlgorithms and Flowchart.ppt
Algorithms and Flowchart.ppt
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx
 
MPP-UPNVJ
MPP-UPNVJMPP-UPNVJ
MPP-UPNVJ
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
 

More from alish sha

T22016 – how to answer with ubs 9
T22016 – how to answer with ubs 9T22016 – how to answer with ubs 9
T22016 – how to answer with ubs 9
alish sha
 
July 2014 theory exam (theory)
July 2014 theory exam (theory)July 2014 theory exam (theory)
July 2014 theory exam (theory)
alish sha
 
Accounting basic equation
Accounting basic equation Accounting basic equation
Accounting basic equation
alish sha
 
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifah
alish sha
 
It 302 computerized accounting (week 1) - sharifah
It 302   computerized accounting (week 1) - sharifahIt 302   computerized accounting (week 1) - sharifah
It 302 computerized accounting (week 1) - sharifah
alish sha
 
What are the causes of conflicts (Bahasa Malaysia)
What are the causes of conflicts (Bahasa Malaysia)What are the causes of conflicts (Bahasa Malaysia)
What are the causes of conflicts (Bahasa Malaysia)
alish sha
 
Lab 9 sem ii_12_13
Lab 9 sem ii_12_13Lab 9 sem ii_12_13
Lab 9 sem ii_12_13alish sha
 
Lab 10 sem ii_12_13
Lab 10 sem ii_12_13Lab 10 sem ii_12_13
Lab 10 sem ii_12_13alish sha
 
Lab 5 2012/2012
Lab 5 2012/2012Lab 5 2012/2012
Lab 5 2012/2012alish sha
 
Purpose elaborate
Purpose elaboratePurpose elaborate
Purpose elaboratealish sha
 
Test 1 alish schema 1
Test 1 alish schema 1Test 1 alish schema 1
Test 1 alish schema 1alish sha
 
Lab 6 sem ii_11_12
Lab 6 sem ii_11_12Lab 6 sem ii_11_12
Lab 6 sem ii_11_12
alish sha
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&aalish sha
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&aalish sha
 
Final project
Final projectFinal project
Final projectalish sha
 
Final project
Final projectFinal project
Final projectalish sha
 
Carry markdam31303
Carry markdam31303Carry markdam31303
Carry markdam31303alish sha
 
Final project
Final projectFinal project
Final projectalish sha
 

More from alish sha (20)

T22016 – how to answer with ubs 9
T22016 – how to answer with ubs 9T22016 – how to answer with ubs 9
T22016 – how to answer with ubs 9
 
July 2014 theory exam (theory)
July 2014 theory exam (theory)July 2014 theory exam (theory)
July 2014 theory exam (theory)
 
Accounting basic equation
Accounting basic equation Accounting basic equation
Accounting basic equation
 
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifah
 
It 302 computerized accounting (week 1) - sharifah
It 302   computerized accounting (week 1) - sharifahIt 302   computerized accounting (week 1) - sharifah
It 302 computerized accounting (week 1) - sharifah
 
What are the causes of conflicts (Bahasa Malaysia)
What are the causes of conflicts (Bahasa Malaysia)What are the causes of conflicts (Bahasa Malaysia)
What are the causes of conflicts (Bahasa Malaysia)
 
Lab 9 sem ii_12_13
Lab 9 sem ii_12_13Lab 9 sem ii_12_13
Lab 9 sem ii_12_13
 
Lab 10 sem ii_12_13
Lab 10 sem ii_12_13Lab 10 sem ii_12_13
Lab 10 sem ii_12_13
 
Lab 6
Lab 6Lab 6
Lab 6
 
Lab 5 2012/2012
Lab 5 2012/2012Lab 5 2012/2012
Lab 5 2012/2012
 
Purpose elaborate
Purpose elaboratePurpose elaborate
Purpose elaborate
 
Lab sheet 1
Lab sheet 1Lab sheet 1
Lab sheet 1
 
Test 1 alish schema 1
Test 1 alish schema 1Test 1 alish schema 1
Test 1 alish schema 1
 
Lab 6 sem ii_11_12
Lab 6 sem ii_11_12Lab 6 sem ii_11_12
Lab 6 sem ii_11_12
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&a
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&a
 
Final project
Final projectFinal project
Final project
 
Final project
Final projectFinal project
Final project
 
Carry markdam31303
Carry markdam31303Carry markdam31303
Carry markdam31303
 
Final project
Final projectFinal project
Final project
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 

Copy of dti2143/dam31303 chap 1 problem solving and program design

  • 1. Universiti Tun Hussien Onn Malaysia Faculty of Mechanical and Manufacturing Engineering
  • 2.
  • 3.
  • 4. Algorithm Techniques Pseudocode Flowchart Program Design Method
  • 5. A text-based design tool that helps programmers to develop algorithm Pseudocode Compact and informal high level language description of a computer programming algorithm Simple codes which resembles program code that will be written during implementation phase (program coding) Program Design Method Using natural language (communication language e.g: Malay/English) wording phrase
  • 6.
  • 7.
  • 8. if student's grade is greater than or equal to 60 print the statement "passed" else print the statement "failed" Examples Keyword ? print means display on the screen monitor if credit_card_number is valid execute transaction based on number and order else show a generic failure message show also means display on the screen monitor Program Design Method
  • 9. Set total to zero Set grade_counter to one While grade_counter is less than or equal to ten Input the next grade Add the grade into the total Set the class_average to the total divided by ten Print the class_average . Examples Keyword? set means assign the value,e.g: total = 0 while is used whenever the process is to be continued Program Design Method
  • 10.
  • 11. Problem example Input Value of x and a Process Replace the value of x and a in the formula, y = 2x +a -6 Output The value of the equation, y Identify the problem Chapter 1 Program Design Method Example 1:
  • 12. Given the value of x is 10 and a is 12, find the result of the following equation: y = 2x + a - 6 Example 1 start read the value of x read the value of a compute the value of y as y = 2x + a -6 display/print the result (or the value of y ) end Pseudocode Write a program! Keyword Program Design Method
  • 13. Uncle Degawan wants to buy 5 tins of paint from Cinda’s shop. The price of each tin of the paint is RM 15.60. Calculate the price which Uncle Degawan have to pay for all the tin of paints he bought. start read the amount_of_paint compute the total_price as price_per_tin times by amount_of _paint display/print the result (or the total_price ) end Pseudocode Write a program! Keyword? Program Design Method
  • 14. start read the student mark if mark is greater than 85 and mark is less than 100, then set grade as A display/print the grade end Pseudocode Keyword Keyword Keyword Program Design Method
  • 15. start Set total to zero Set grade counter to one While grade counter is less than or equal to ten input the next grade add the grade into the total add one to the grade counter Set the class average to the total divided by ten Print the class average end Pseudocode Keyword Keyword Keyword Program Design Method
  • 17.
  • 18. Flowchart Symbols Chapter 1b Program Design Method Start/Stop (oval) The terminator symbol marks the starting or ending point of the system. It usually contains the word "Start" or "End." Action or Process (rectangle) A box can represent a single step ("add two cups of flour"), or and entire sub-process ("make bread") within a larger process.
  • 19. Flowchart Symbols Chapter 1 Program Design Method Decision (Diamond) A decision or branching point. Lines representing different decisions emerge from different points of the diamond. Input/Output (Parallelogram) Represents material or information entering or leaving the system, such as customer order (input) or a product (output).
  • 20. Flowchart Symbols Chapter 1 Program Design Method Flow Lines Lines indicate the sequence of steps and the direction of flow. On-Page Connector Indicates that the flow continues where a matching symbol (containing the same letter) has been placed in the same page.
  • 21. Flowchart Symbols Chapter 1 Program Design Method Off-Page Connector Indicates that the process continues on another page. Database / Disk Storage Input-Output Symbol Indicates input from or output to disk storage.
  • 22. Flowchart Example Chapter 1 Program Design Method
  • 23. Example What software use to draw flowchart? You can use Ms Word > AutoShapes> Flowchart or other flowchart drawing tools e.g: SmartDraw/Visio Drawing, Rational Rose,etc. Flowchart Chapter 1 Program Design Method
  • 24.
  • 25. Flowchart Example Chapter 1 Program Design Method Read x Read a y = 2x + a - 6 Display y Start End
  • 26.
  • 27.
  • 28.
  • 29. start Set total to zero Set grade_counter to one While grade _ counter is less than or equal to ten input the next grade add the grade into the total add one to the grade_counter Set the class average to the total divided by ten Print the class average end Pseudocode Chapter 1 Program Design Method Flowchart How ?
  • 30. start read the amount_of_paint compute the total_price as price_per_tin times by amount_of paint display/print the result (or the total price ) end start read the student mark if mark is greater than 85 and mark is less than 100, then set grade as A display/print the grade end Try yourself! Convert to flowchar Convert to flowchart Chapter 1 Program Design Method
  • 31. A box has height, width and length. Write the pseudo code to calculate the volume of a box. Write the pseudo code to calculate salary of an employee for a month. Convert to Convert to flowchart Try yourself! Program Design Method
  • 32. Question Chapter 1 Program Design Method

Editor's Notes

  1. Prepared by : Hazalila Kamaludin, 2009/2010
  2. Prepared by : Hazalila Kamaludin, 2009/2010
  3. Prepared by : Hazalila Kamaludin, 2009/2010
  4. Prepared by : Hazalila Kamaludin, 2009/2010
  5. Prepared by : Hazalila Kamaludin, 2009/2010
  6. Prepared by : Hazalila Kamaludin, 2009/2010
  7. Prepared by : Hazalila Kamaludin, 2009/2010
  8. Prepared by : Hazalila Kamaludin, 2009/2010
  9. Prepared by : Hazalila Kamaludin, 2009/2010
  10. Prepared by : Hazalila Kamaludin, 2009/2010
  11. Prepared by : Hazalila Kamaludin, 2009/2010
  12. Prepared by : Hazalila Kamaludin, 2009/2010
  13. Prepared by : Hazalila Kamaludin, 2009/2010
  14. Prepared by : Hazalila Kamaludin, 2009/2010
  15. Prepared by : Hazalila Kamaludin, 2009/2010
  16. Prepared by : Hazalila Kamaludin, 2009/2010
  17. Prepared by : Hazalila Kamaludin, 2009/2010
  18. Prepared by : Hazalila Kamaludin, 2009/2010
  19. Prepared by : Hazalila Kamaludin, 2009/2010
  20. Prepared by : Hazalila Kamaludin, 2009/2010
  21. Prepared by : Hazalila Kamaludin, 2009/2010
  22. Prepared by : Hazalila Kamaludin, 2009/2010
  23. Prepared by : Hazalila Kamaludin, 2009/2010
  24. Prepared by : Hazalila Kamaludin, 2009/2010
  25. Prepared by : Hazalila Kamaludin, 2009/2010
  26. Prepared by : Hazalila Kamaludin, 2009/2010
  27. Prepared by : Hazalila Kamaludin, 2009/2010
  28. Prepared by : Hazalila Kamaludin, 2009/2010
  29. Prepared by : Hazalila Kamaludin, 2009/2010
  30. Prepared by : Hazalila Kamaludin, 2009/2010
  31. Prepared by : Hazalila Kamaludin, 2009/2010