SlideShare a Scribd company logo
1 of 17
Download to read offline
Mindanao Polytechnic College GSC
Mindanao Polytechnic College
General Santos City
Steps in Programming and
Development
Narene M. Nagares, MIT
Department of Information Technology
Mindanao Polytechnic College GSC
Steps in Programming
• Programming is a problem-solving activity. A
person with good problem solving skills will
tend to be a good programmer. To develop
this skill, a programmer must practice the
following steps:
COMP1 - Computer Fundamentals & Programming 2
Mindanao Polytechnic College GSC
I - Problem Analysis
1. The first step is to determine the output, which
is the goal or purpose of solving the problem.
When you identify the output, it will then be
easier to find which information is required to
reach that output.
2. Determine the input, which is the information
needed to reach the goal or output.
• You cannot solve a problem unless you understand it, and you
cannot understand a problem unless you analyze it. An example is
shown on the next slide.
3
COMP1 - Computer Fundamentals & Programming
Mindanao Polytechnic College GSC
Treyson Mobley problem:
• Treyson Mobley wants a program that
calculates and displays the amount he should
tip a waiter at a restaurant. The program
should subtract any liquor charge from the
total bill and then calculate the tip (using a
percentage) on the remainder.
4
COMP1 - Computer Fundamentals & Programming
Mindanao Polytechnic College GSC
Treyson Mobley problem- IPO Chart
5
COMP1 - Computer Fundamentals & Programming
• Here is an example on how to construct the IPO
(Input-Processing-Output) Chart for the given
problem. The goal of the program is to calculate and
display the tip for the waiter. This is the output.
• And to solve for the tip, we need the following
inputs, which are stated in the problem, total bill,
liquor charge and tip percentage.
Mindanao Polytechnic College GSC
Other Examples:
• Jack Osaki earns $7 per hour. Last week, Jack worked 50
hours. He wants a program that calculates and displays his
weekly gross pay.
• Jack wants to know his weekly gross pay, this is the output.
To solve for the pay, we need the rate per hour and the
hours worked, these are our inputs. Note how the values
for his hourly rate and worked hours did not matter in our
IPO chart. This is because those numbers can vary or
change overtime.
6
COMP1 - Computer Fundamentals & Programming
Input Processing Output
rate per hour
hours worked
Processing item: none weekly gross pay
Mindanao Polytechnic College GSC
Other Examples:
• Caroline Casey wants a program that calculates and
displays the area of any rectangle.
• In this example, the length and width were not
explicitly stated in the problem because there is
already a presumption that you know the formula on
how to solve the area of a rectangle.
7
COMP1 - Computer Fundamentals & Programming
Input Processing Output
length
width
Processing item: none area of a rectangle
Mindanao Polytechnic College GSC
II – Setting up an Algorithm
• Write the instructions that will transform the
input into the output.
1. Enter some data (input items)
2. Process data
3. Display some data
*Algorithm - set of step-by-step instructions that
describe how to accomplish a task. In other words,
an algorithm is a solution to a problem, usually by
performing some calculations. (begins with a
verb)
8
COMP1 - Computer Fundamentals & Programming
Mindanao Polytechnic College GSC
Treyson Mobley problem – IPO Chart
9
COMP1 - Computer Fundamentals & Programming
Mindanao Polytechnic College GSC
Planning Tools
 Pseudocode - short english statements that
resembles programming language
instructions. An example of an algorithm using
pseudocode is shown from the previous slide.
• Flowchart - uses standardized symbols to
visually depict an algorithm.
10
COMP1 - Computer Fundamentals & Programming
Mindanao Polytechnic College GSC
Flowchart Symbols
Start/
Stop
Process
Input/
Output
Flowline
Decision
11
COMP1 - Computer Fundamentals & Programming
Mindanao Polytechnic College GSC 12
COMP1 - Computer Fundamentals & Programming
Treyson Mobley
Solution:
Mindanao Polytechnic College GSC 13
The processing item is neither an input
nor an output. It is an added item to make
computations simpler.
Mindanao Polytechnic College GSC
Complete an appropriate IPO chart, using pseudocode
AND flowchart in the Algorithm section. (Activity 5)
1. Kendra Chopra lives in a state that charges a 5% sales tax. She wants a
program that displays the amount of sales tax due on a purchase.
2. Wilma Peterson is paid by the hour. She wants a program that calculates
her weekly gross pay. For this exercise, you do not need to worry about
overtime pay, as Wilma never works more than 40 hours in a week.
3. Party-On sells individual hot/cold cups and dessert plates for parties. Sue
Chen wants a program that allows her to enter the price of a cup,the
price of a plate, the number of cups purchased, the number of plates
purchased, and the sales tax rate. The program should calculate and
display the total cost of the purchase.
4. The sales manager at Colfax Products wants a program that allows him
to enter the sales made in each of two states. The program should
calculate and display the commission, which is a percentage of the total
sales.
5. Jenna Williams is paid based on an annual salary rather than an hourly
wage. She wants a program that calculates the amount of her gross pay
for each pay period.
14
COMP1 - Computer Fundamentals & Programming
Mindanao Polytechnic College GSC
III - Coding
• After having set up the algorithm, the next step is
translate or convert the algorithm into a list of
instructions in a code or language that the
computer can understand and execute.
• The list of instructions understood by the
computer is now called a program.
• The list of instructions that will implement the
algorithm can be understood by the computer
simply because "it is written in the vocabulary of
the programming language and conforms to the
grammatical rules of the language.
15
COMP1 - Computer Fundamentals & Programming
Mindanao Polytechnic College GSC
IV – Running, Testing & Debugging
• The fourth step in program development would
be to execute or run the program. The program is
executed or run on different input data.
• Testing is the art of creating different sets of
sample data upon which the program will be run.
– Desk checking - the process of executing a program
with test input data and checking the output results
against the requirements.
• Bugs - errors that come out during program execution
Debugging – the art of correcting errors.
16
COMP1 - Computer Fundamentals & Programming
Mindanao Polytechnic College GSC
V – Documentation
• Three basic types:
– User Manual - contains information on the software
and hardware requirements, installation procedures,
and step-by-step instructions on how to use the
system.
– Technical Manual - is a printed copy of the
information regarding how the program was designed
and how it was created.
– Internal Manual - has the same info with TM but these
are stored within the program themselves, through
the use of comments.
17
COMP1 - Computer Fundamentals & Programming

More Related Content

Similar to CC100 Lesson -6B.fnhgmnh,hg,gj.klbcjgjgbg

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
 
dokumen.tips_spm-5e-software-effort-estimation-the-mcgraw-hill-companies-2009...
dokumen.tips_spm-5e-software-effort-estimation-the-mcgraw-hill-companies-2009...dokumen.tips_spm-5e-software-effort-estimation-the-mcgraw-hill-companies-2009...
dokumen.tips_spm-5e-software-effort-estimation-the-mcgraw-hill-companies-2009...hkhalailah29
 
Nota program development
Nota program developmentNota program development
Nota program developmentAzmiah Mahmud
 
Module programming
Module programmingModule programming
Module programmingKak Yong
 
Introduction To Software Engineering
 Introduction To Software Engineering Introduction To Software Engineering
Introduction To Software EngineeringMohsinAli773
 
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
 
Software engineering srs library management assignment
Software engineering srs library management assignmentSoftware engineering srs library management assignment
Software engineering srs library management assignmentRajat Mittal
 
Beit 381 se lec 3 - 46 - 12 feb14 - sd needs teams to develop intro
Beit 381 se lec 3 - 46  - 12 feb14 - sd needs teams to develop introBeit 381 se lec 3 - 46  - 12 feb14 - sd needs teams to develop intro
Beit 381 se lec 3 - 46 - 12 feb14 - sd needs teams to develop introbabak danyal
 
INF20015 Requirements Analysis & Modelling pg. 1 Swi.docx
INF20015 Requirements Analysis & Modelling   pg. 1 Swi.docxINF20015 Requirements Analysis & Modelling   pg. 1 Swi.docx
INF20015 Requirements Analysis & Modelling pg. 1 Swi.docxjaggernaoma
 
Code tuning strategies
Code tuning strategiesCode tuning strategies
Code tuning strategiesAsha Sari
 
Chapter 01 Planning Computer Program (re-upload)
Chapter 01 Planning Computer Program (re-upload)Chapter 01 Planning Computer Program (re-upload)
Chapter 01 Planning Computer Program (re-upload)bluejayjunior
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfMMRF2
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer ProgrammingProf. Erwin Globio
 

Similar to CC100 Lesson -6B.fnhgmnh,hg,gj.klbcjgjgbg (20)

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
 
dokumen.tips_spm-5e-software-effort-estimation-the-mcgraw-hill-companies-2009...
dokumen.tips_spm-5e-software-effort-estimation-the-mcgraw-hill-companies-2009...dokumen.tips_spm-5e-software-effort-estimation-the-mcgraw-hill-companies-2009...
dokumen.tips_spm-5e-software-effort-estimation-the-mcgraw-hill-companies-2009...
 
Metrics
MetricsMetrics
Metrics
 
Notacd08
Notacd08Notacd08
Notacd08
 
Nota program development
Nota program developmentNota program development
Nota program development
 
Module programming
Module programmingModule programming
Module programming
 
La5 programming
La5   programmingLa5   programming
La5 programming
 
MPP-UPNVJ
MPP-UPNVJMPP-UPNVJ
MPP-UPNVJ
 
Business analysis
Business analysisBusiness analysis
Business analysis
 
Introduction To Software Engineering
 Introduction To Software Engineering Introduction To Software Engineering
Introduction To Software Engineering
 
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
 
Software metrics
Software metricsSoftware metrics
Software metrics
 
Software engineering srs library management assignment
Software engineering srs library management assignmentSoftware engineering srs library management assignment
Software engineering srs library management assignment
 
Beit 381 se lec 3 - 46 - 12 feb14 - sd needs teams to develop intro
Beit 381 se lec 3 - 46  - 12 feb14 - sd needs teams to develop introBeit 381 se lec 3 - 46  - 12 feb14 - sd needs teams to develop intro
Beit 381 se lec 3 - 46 - 12 feb14 - sd needs teams to develop intro
 
INF20015 Requirements Analysis & Modelling pg. 1 Swi.docx
INF20015 Requirements Analysis & Modelling   pg. 1 Swi.docxINF20015 Requirements Analysis & Modelling   pg. 1 Swi.docx
INF20015 Requirements Analysis & Modelling pg. 1 Swi.docx
 
Code tuning strategies
Code tuning strategiesCode tuning strategies
Code tuning strategies
 
Chapter 01 Planning Computer Program (re-upload)
Chapter 01 Planning Computer Program (re-upload)Chapter 01 Planning Computer Program (re-upload)
Chapter 01 Planning Computer Program (re-upload)
 
Chapter 11 pcp
Chapter 11 pcpChapter 11 pcp
Chapter 11 pcp
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 

Recently uploaded

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 

Recently uploaded (20)

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 

CC100 Lesson -6B.fnhgmnh,hg,gj.klbcjgjgbg

  • 1. Mindanao Polytechnic College GSC Mindanao Polytechnic College General Santos City Steps in Programming and Development Narene M. Nagares, MIT Department of Information Technology
  • 2. Mindanao Polytechnic College GSC Steps in Programming • Programming is a problem-solving activity. A person with good problem solving skills will tend to be a good programmer. To develop this skill, a programmer must practice the following steps: COMP1 - Computer Fundamentals & Programming 2
  • 3. Mindanao Polytechnic College GSC I - Problem Analysis 1. The first step is to determine the output, which is the goal or purpose of solving the problem. When you identify the output, it will then be easier to find which information is required to reach that output. 2. Determine the input, which is the information needed to reach the goal or output. • You cannot solve a problem unless you understand it, and you cannot understand a problem unless you analyze it. An example is shown on the next slide. 3 COMP1 - Computer Fundamentals & Programming
  • 4. Mindanao Polytechnic College GSC Treyson Mobley problem: • Treyson Mobley wants a program that calculates and displays the amount he should tip a waiter at a restaurant. The program should subtract any liquor charge from the total bill and then calculate the tip (using a percentage) on the remainder. 4 COMP1 - Computer Fundamentals & Programming
  • 5. Mindanao Polytechnic College GSC Treyson Mobley problem- IPO Chart 5 COMP1 - Computer Fundamentals & Programming • Here is an example on how to construct the IPO (Input-Processing-Output) Chart for the given problem. The goal of the program is to calculate and display the tip for the waiter. This is the output. • And to solve for the tip, we need the following inputs, which are stated in the problem, total bill, liquor charge and tip percentage.
  • 6. Mindanao Polytechnic College GSC Other Examples: • Jack Osaki earns $7 per hour. Last week, Jack worked 50 hours. He wants a program that calculates and displays his weekly gross pay. • Jack wants to know his weekly gross pay, this is the output. To solve for the pay, we need the rate per hour and the hours worked, these are our inputs. Note how the values for his hourly rate and worked hours did not matter in our IPO chart. This is because those numbers can vary or change overtime. 6 COMP1 - Computer Fundamentals & Programming Input Processing Output rate per hour hours worked Processing item: none weekly gross pay
  • 7. Mindanao Polytechnic College GSC Other Examples: • Caroline Casey wants a program that calculates and displays the area of any rectangle. • In this example, the length and width were not explicitly stated in the problem because there is already a presumption that you know the formula on how to solve the area of a rectangle. 7 COMP1 - Computer Fundamentals & Programming Input Processing Output length width Processing item: none area of a rectangle
  • 8. Mindanao Polytechnic College GSC II – Setting up an Algorithm • Write the instructions that will transform the input into the output. 1. Enter some data (input items) 2. Process data 3. Display some data *Algorithm - set of step-by-step instructions that describe how to accomplish a task. In other words, an algorithm is a solution to a problem, usually by performing some calculations. (begins with a verb) 8 COMP1 - Computer Fundamentals & Programming
  • 9. Mindanao Polytechnic College GSC Treyson Mobley problem – IPO Chart 9 COMP1 - Computer Fundamentals & Programming
  • 10. Mindanao Polytechnic College GSC Planning Tools  Pseudocode - short english statements that resembles programming language instructions. An example of an algorithm using pseudocode is shown from the previous slide. • Flowchart - uses standardized symbols to visually depict an algorithm. 10 COMP1 - Computer Fundamentals & Programming
  • 11. Mindanao Polytechnic College GSC Flowchart Symbols Start/ Stop Process Input/ Output Flowline Decision 11 COMP1 - Computer Fundamentals & Programming
  • 12. Mindanao Polytechnic College GSC 12 COMP1 - Computer Fundamentals & Programming Treyson Mobley Solution:
  • 13. Mindanao Polytechnic College GSC 13 The processing item is neither an input nor an output. It is an added item to make computations simpler.
  • 14. Mindanao Polytechnic College GSC Complete an appropriate IPO chart, using pseudocode AND flowchart in the Algorithm section. (Activity 5) 1. Kendra Chopra lives in a state that charges a 5% sales tax. She wants a program that displays the amount of sales tax due on a purchase. 2. Wilma Peterson is paid by the hour. She wants a program that calculates her weekly gross pay. For this exercise, you do not need to worry about overtime pay, as Wilma never works more than 40 hours in a week. 3. Party-On sells individual hot/cold cups and dessert plates for parties. Sue Chen wants a program that allows her to enter the price of a cup,the price of a plate, the number of cups purchased, the number of plates purchased, and the sales tax rate. The program should calculate and display the total cost of the purchase. 4. The sales manager at Colfax Products wants a program that allows him to enter the sales made in each of two states. The program should calculate and display the commission, which is a percentage of the total sales. 5. Jenna Williams is paid based on an annual salary rather than an hourly wage. She wants a program that calculates the amount of her gross pay for each pay period. 14 COMP1 - Computer Fundamentals & Programming
  • 15. Mindanao Polytechnic College GSC III - Coding • After having set up the algorithm, the next step is translate or convert the algorithm into a list of instructions in a code or language that the computer can understand and execute. • The list of instructions understood by the computer is now called a program. • The list of instructions that will implement the algorithm can be understood by the computer simply because "it is written in the vocabulary of the programming language and conforms to the grammatical rules of the language. 15 COMP1 - Computer Fundamentals & Programming
  • 16. Mindanao Polytechnic College GSC IV – Running, Testing & Debugging • The fourth step in program development would be to execute or run the program. The program is executed or run on different input data. • Testing is the art of creating different sets of sample data upon which the program will be run. – Desk checking - the process of executing a program with test input data and checking the output results against the requirements. • Bugs - errors that come out during program execution Debugging – the art of correcting errors. 16 COMP1 - Computer Fundamentals & Programming
  • 17. Mindanao Polytechnic College GSC V – Documentation • Three basic types: – User Manual - contains information on the software and hardware requirements, installation procedures, and step-by-step instructions on how to use the system. – Technical Manual - is a printed copy of the information regarding how the program was designed and how it was created. – Internal Manual - has the same info with TM but these are stored within the program themselves, through the use of comments. 17 COMP1 - Computer Fundamentals & Programming