SlideShare a Scribd company logo
1 of 16
The Problem Statement  The Defining Diagram
Introduction Defining the problem is the first step towards solving a problem.  It is one of the most important steps in problem-solving. Many students tend to overlook this stage of the problem-solving process.
Defining the problem Defining the problem is a way to help the programmer understand what he or she is required to do. steps I. what is given (that is, the inputs), 2. the expected results (that is, the output), 3. the tasks that must be performed (that is, processing).
The Defining Diagram
input Given Read   Accept Example  A program is required to acceptfive numbers. Input >>>>>>>       5 numbers
output Print Display  Produce Output Example  A program is required to accept five numbers and output the first two. Output >>>>>>>>>   first two numbers
processing "What do I have to do with the inputs in order to produce the desired output?"
Problem 1 A program is required to read three (3) numbers calculate and print their total.
Problem 1 A program is required to read three (3) numbers, calculate and print their total.
Problem 1 A program is required to read three (3) numbers calculate and print their total.
Please note 1.  In the defining diagram,  the actions must be listed in a logical sequential order. 2.  All the necessary actions must be explicitly stated. For example,  the read action and the print action must not be assumed. 3.  The processing section is NOT the solution to the problem. It is simply a list of the things that must be done in order to solve the problem.  Later on we will write an algorithm to tell the computer how to solve the problem. In some problems the input, output and processing parameters might not be stated as explicitly as in the one above. Let us look at an example of such.
Problem 2 Given three numbers representing the age of‘ three boys respectively, write a program to find their average age and also determine the age of the oldest boy.
Problem 2 Given three numbers representing the age of‘ three boys respectively, write a program to find their average age and also determine the age of the oldest boy.
Problem 3 The cost of a new car is the sum of the wholesale cost, the local sales tax and the dealer's percentage mark-up. Assuming the dealer's mark-up is 10 percent of the wholesale cost and the sales tax is 6 percent, design a program to read a car ID and the wholesale cost of  the car and print the car ID and the cost to the consumer.
Problem 3 The cost of a new car is the sum of the wholesale cost, the local sales tax and the dealer's percentage mark-up. Assuming the dealer's mark-up is 10 percent of the wholesale cost and the sales tax is 6 percent, design a program to read a car ID and the wholesale cost of  the car and print the car ID and the cost to the consumer.
Problem 3 The cost of a new car is the sum of the wholesale cost, the local sales tax and the dealer's percentage mark-up. Assuming the dealer's mark-up is 10 percent of the wholesale cost and the sales tax is 6 percent, design a program to read a car ID and the wholesale cost of  the car and print the car ID and the cost to the consumer.

More Related Content

Similar to The problem statement

Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)Puneet narula
 
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxChallenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxRusherGamer1
 
Comp 122 lab 2 lab report and source code
Comp 122 lab 2 lab report and source codeComp 122 lab 2 lab report and source code
Comp 122 lab 2 lab report and source codepradesigali1
 
QT Slides Class One
QT Slides Class OneQT Slides Class One
QT Slides Class Onevinay1878
 
Can I Buy An Essay Now Oelbert Gymnasiumoelbert
Can I Buy An Essay Now Oelbert GymnasiumoelbertCan I Buy An Essay Now Oelbert Gymnasiumoelbert
Can I Buy An Essay Now Oelbert GymnasiumoelbertAngela Gibbs
 
Product manager interview estimation
Product manager interview estimationProduct manager interview estimation
Product manager interview estimationAbhishek Kori
 
Detection of credit card fraud
Detection of credit card fraudDetection of credit card fraud
Detection of credit card fraudBastiaan Frerix
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sitSaurabh846965
 
Lpp through graphical analysis
Lpp through graphical analysis Lpp through graphical analysis
Lpp through graphical analysis YuktaBansal1
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEWshyamuopeight
 
9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdf9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdfNaeem Mughal
 
Learning area 5 programming
Learning area 5   programmingLearning area 5   programming
Learning area 5 programmingShuren Lew
 
Comp 122 lab 3 lab report and source code
Comp 122 lab 3 lab report and source codeComp 122 lab 3 lab report and source code
Comp 122 lab 3 lab report and source codepradesigali1
 
ieGAT Practice Test Sample Simulation For Free to Print
ieGAT Practice Test Sample Simulation For Free to PrintieGAT Practice Test Sample Simulation For Free to Print
ieGAT Practice Test Sample Simulation For Free to PrintieGAT Practice Test
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchartfika sweety
 
Basic Business Math - Study Notes v02
Basic Business Math - Study Notes v02Basic Business Math - Study Notes v02
Basic Business Math - Study Notes v02OxfordCambridge
 

Similar to The problem statement (20)

Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)
 
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxChallenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
 
Comp 122 lab 2 lab report and source code
Comp 122 lab 2 lab report and source codeComp 122 lab 2 lab report and source code
Comp 122 lab 2 lab report and source code
 
QT Slides Class One
QT Slides Class OneQT Slides Class One
QT Slides Class One
 
Can I Buy An Essay Now Oelbert Gymnasiumoelbert
Can I Buy An Essay Now Oelbert GymnasiumoelbertCan I Buy An Essay Now Oelbert Gymnasiumoelbert
Can I Buy An Essay Now Oelbert Gymnasiumoelbert
 
Current trend in IT
Current trend in ITCurrent trend in IT
Current trend in IT
 
Product manager interview estimation
Product manager interview estimationProduct manager interview estimation
Product manager interview estimation
 
Detection of credit card fraud
Detection of credit card fraudDetection of credit card fraud
Detection of credit card fraud
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
 
Lpp through graphical analysis
Lpp through graphical analysis Lpp through graphical analysis
Lpp through graphical analysis
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
 
9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdf9th Comp Ch 1 LQ.pdf
9th Comp Ch 1 LQ.pdf
 
Telecom Churn Analysis
Telecom Churn AnalysisTelecom Churn Analysis
Telecom Churn Analysis
 
Learning area 5 programming
Learning area 5   programmingLearning area 5   programming
Learning area 5 programming
 
Comp 122 lab 3 lab report and source code
Comp 122 lab 3 lab report and source codeComp 122 lab 3 lab report and source code
Comp 122 lab 3 lab report and source code
 
ieGAT Practice Test Sample Simulation For Free to Print
ieGAT Practice Test Sample Simulation For Free to PrintieGAT Practice Test Sample Simulation For Free to Print
ieGAT Practice Test Sample Simulation For Free to Print
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchart
 
17 Jo P May 08
17 Jo P May 0817 Jo P May 08
17 Jo P May 08
 
Basic Business Math - Study Notes
Basic Business Math - Study NotesBasic Business Math - Study Notes
Basic Business Math - Study Notes
 
Basic Business Math - Study Notes v02
Basic Business Math - Study Notes v02Basic Business Math - Study Notes v02
Basic Business Math - Study Notes v02
 

Recently uploaded

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Recently uploaded (20)

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

The problem statement

  • 1. The Problem Statement The Defining Diagram
  • 2. Introduction Defining the problem is the first step towards solving a problem. It is one of the most important steps in problem-solving. Many students tend to overlook this stage of the problem-solving process.
  • 3. Defining the problem Defining the problem is a way to help the programmer understand what he or she is required to do. steps I. what is given (that is, the inputs), 2. the expected results (that is, the output), 3. the tasks that must be performed (that is, processing).
  • 5. input Given Read Accept Example A program is required to acceptfive numbers. Input >>>>>>> 5 numbers
  • 6. output Print Display Produce Output Example A program is required to accept five numbers and output the first two. Output >>>>>>>>> first two numbers
  • 7. processing "What do I have to do with the inputs in order to produce the desired output?"
  • 8. Problem 1 A program is required to read three (3) numbers calculate and print their total.
  • 9. Problem 1 A program is required to read three (3) numbers, calculate and print their total.
  • 10. Problem 1 A program is required to read three (3) numbers calculate and print their total.
  • 11. Please note 1. In the defining diagram, the actions must be listed in a logical sequential order. 2. All the necessary actions must be explicitly stated. For example, the read action and the print action must not be assumed. 3. The processing section is NOT the solution to the problem. It is simply a list of the things that must be done in order to solve the problem. Later on we will write an algorithm to tell the computer how to solve the problem. In some problems the input, output and processing parameters might not be stated as explicitly as in the one above. Let us look at an example of such.
  • 12. Problem 2 Given three numbers representing the age of‘ three boys respectively, write a program to find their average age and also determine the age of the oldest boy.
  • 13. Problem 2 Given three numbers representing the age of‘ three boys respectively, write a program to find their average age and also determine the age of the oldest boy.
  • 14. Problem 3 The cost of a new car is the sum of the wholesale cost, the local sales tax and the dealer's percentage mark-up. Assuming the dealer's mark-up is 10 percent of the wholesale cost and the sales tax is 6 percent, design a program to read a car ID and the wholesale cost of the car and print the car ID and the cost to the consumer.
  • 15. Problem 3 The cost of a new car is the sum of the wholesale cost, the local sales tax and the dealer's percentage mark-up. Assuming the dealer's mark-up is 10 percent of the wholesale cost and the sales tax is 6 percent, design a program to read a car ID and the wholesale cost of the car and print the car ID and the cost to the consumer.
  • 16. Problem 3 The cost of a new car is the sum of the wholesale cost, the local sales tax and the dealer's percentage mark-up. Assuming the dealer's mark-up is 10 percent of the wholesale cost and the sales tax is 6 percent, design a program to read a car ID and the wholesale cost of the car and print the car ID and the cost to the consumer.