SlideShare a Scribd company logo
COB204A62: BUSINESS ANALYTICS
PROGRAMMING
PROF. DHANAMALAR M
DEPARTMENT OF COMPUTER SCIENCE
RUNNING PROGRAMS
Memory
Input Data
Program Output
Machine language
program
(executable file)
Data entered
during execution
Computed results
C P U
• Steps that the computer goes through to run a
program:
PROGRAM EXECUTION
• Steps taken by the CPU to run a program (instructions
are in machine language):
1. Fetch an instruction
2. Decode (interpret) the instruction
3. Retrieve data, if needed
4. Execute (perform) actual processing
5. Store the results, if needed
PROGRAM ERRORS
• Syntax Errors:
• Errors in grammar of the language
• Runtime error:
• When there are no syntax errors, but the program can’t complete
execution
• Divide by zero
• Invalid input data
• Logical errors:
• The program completes execution, but delivers incorrect results
• Incorrect usage of parentheses
PROGRAM DEVELOPMENT CYCLE
PROGRAM DEVELOPMENT CYCLE
• Many programmers follow a sequence of Steps to create their
programs.
1. Analyze – Define the Problem
• Make sure that you understand what the program should do. What
should the user be able to enter? How? How does the program
come up with an answer? What does the program output? How?
• User – a person who uses a computer program.
• End User – the user that the program was made for.
2. Design – Plan a Solution for the Problem
• Develop a PRECISE sequence of steps to solve the problem
• An algorithm is a precise sequence of steps to solve a problem.
DEVELOP AN ALGORITHM
• Imagine you want a program that tells a user how many
stamps they need in order to mail a certain number of
pages.
• You need one stamp for every 5 pages
• 6 pages = 2 stamps
• 12 pages = 3 stamps
• …
• Write an algorithm (the steps needed) to solve this problem
PROGRAM DEVELOPMENT CYCLE –
DESIGN (CONTINUED)
• Typically a program follows three general steps
1. Input
2. Processing (Formulas)
3. Output
DEVELOP AN ALGORITHM, 2ND
ATTEMPT
• OK, with this knowledge, try writing the algorithm
again
PROGRAM DEVELOPMENT CYCLE –
DESIGN (CONTINUED)
• Are those three steps enough?
• What about if the user enters “Banana” instead of a number of sheets?
• The program does not know how to find the number of stamps required
to mail “Banana” number of sheets
• In order for the program to run without crashing, our algorithm must
make sure that the user inputs some valid data.
• There are two main ways of doing this:
1. Prevention – Making sure that the user is not physically able to
enter in invalid data.
2. Validation – Allowing the user to enter invalid data, but checking it
to make sure it is valid before processing.
PROGRAM DEVELOPMENT CYCLE –
DESIGN (CONTINUED)
• So, there are really 4 general steps most programs follow:
1. Input
1. Read Input
2. Validate Input
2. Process
3. Output
DEVELOP AN ALGORITHM, 3RD
ATTEMPT
• OK, now with THAT information, try developing the algorithm
• One good algorithm developed could look like this:
1. Request the number of sheets of paper from the user; call
it Sheets (Input/Read)
2. Make sure Sheets is a positive whole number
(Input/Validation)
3. Divide Sheets by 5 (Processing)
4. Round the result from step 3 up to the highest whole
number; call it Stamps (Processing)
5. Reply with the number Stamps (Output)
PROGRAMMING TOOLS
• Flowcharts – A chart that consists of symbols connected by arrows.
Within each symbol is a phrase presenting the activity at that step.
The shape of the symbol indicates the type of operation that is to
occur.
• Hierarchy Charts – A chart that shows the overall program structure.
These charts describe what each part, or module, does and how they
are related. These modules intentionally omit details of how they
work.
• Pseudocode – an abbreviated plain English version of actual
computer code. Kind of a mix between English and code. THERE
IS NO OFFICIAL SYNTAX TO PSEUDOCODE.
STAMPS FLOWCHART
Yes
No
Start
Read
Sheets
Is sheets a
positive
whole
number?
Display
Error
Message
Set Stamps
= Sheets/5
Round Stamps to
nearest whole
number
Display
Stamps
End
HIERARCHY CHART
Postage
Stamp
Program
Calculate
Stamps
Display
Stamps
Input
Read Sheets
Validate
Sheets
Set Stamps
= Sheets/5
Round Stamps to
the next whole
number
PROGRAM DEVELOPMENT CYCLE
3. Write the Code – Implement a solution
• The instructions in a programming language collectively called
code.
• Your code should be a translation of your algorithm developed
into the programming language.
• In this class we use Java, but there are many other
programming languages: C, C++, C#, Ruby, Python, Visual
Basic, etc.
• This is the major focus of this course, but note that you need to
be able to think algorithmically in order to do this.
• Meaning, you need to be able to logically solve the problem in
order to write a program for it.
PROGRAM DEVELOPMENT CYCLE
4. Testing and Debugging – Locate and remove any errors in the
program
• Testing is the process of finding errors in a program
• Debugging is the process of removing errors in a program.
• An error in a program is called a bug.
• We will talk more specifically about the kinds of errors that can
occur in a program once we start programming.
PROGRAM DEVELOPMENT CYCLE
5. Complete All Documentation – Organize the material that describes
the program.
• Documentation is any material whose purpose is to allow another
person or programmer to use or understand the program
• Two kinds of documentation:
1. External Documentation – Material outside of the code files
that describe the program.
2. Internal Documentation – Lines inside of a code file that do
nothing except describe details of the program. In Java, these
are called comments.
5. Maintenance:
• Updating and correction of the program for changed conditions
and field experience is accounted for in maintenance.
• Maintenance becomes essential in following situations:
• Change in specification,
• Change in equipment,
• Errors which are found during the actual execution of the program.
Uses of Computer Programs
• Today computer programs are being used in almost every field,
household, agriculture, medical, entertainment, defense, communication,
etc. Listed below are a few applications of computer programs −
• MS Word, MS Excel, Adobe Photoshop, Internet Explorer, Chrome, etc.,
are examples of computer programs.
• Computer programs are being used to develop graphics and special
effects in movie making.
• Computer programs are being used to perform Ultrasounds, X-Rays, and
other medical examinations.
• Computer programs are being used in our mobile phones for SMS, Chat,
and voice communication.
Ad

More Related Content

What's hot (20)

Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
Jordan Delacruz
 
Selection sorting
Selection sortingSelection sorting
Selection sorting
Himanshu Kesharwani
 
SPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and FlowchartSPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and Flowchart
Mohammad Imam Hossain
 
Introduction to Algorithms & flow charts
Introduction to Algorithms & flow chartsIntroduction to Algorithms & flow charts
Introduction to Algorithms & flow charts
Yash Gupta
 
Data Structure (Queue)
Data Structure (Queue)Data Structure (Queue)
Data Structure (Queue)
Adam Mukharil Bachtiar
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
Nahid Hasan
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Elizabeth de Leon Aler
 
Abstract Data Types
Abstract Data TypesAbstract Data Types
Abstract Data Types
karthikeyanC40
 
Algorithm
AlgorithmAlgorithm
Algorithm
IHTISHAM UL HAQ
 
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
Shail Nakum
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
shameen khan
 
Sorting
SortingSorting
Sorting
Ashim Lamichhane
 
UNIT I LINEAR DATA STRUCTURES – LIST
UNIT I 	LINEAR DATA STRUCTURES – LIST 	UNIT I 	LINEAR DATA STRUCTURES – LIST
UNIT I LINEAR DATA STRUCTURES – LIST
Kathirvel Ayyaswamy
 
Fundamentals of data structures ellis horowitz & sartaj sahni
Fundamentals of data structures   ellis horowitz & sartaj sahniFundamentals of data structures   ellis horowitz & sartaj sahni
Fundamentals of data structures ellis horowitz & sartaj sahni
Hitesh Wagle
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
Nikhil Sharma
 
Queue ppt
Queue pptQueue ppt
Queue ppt
SouravKumar328
 
Reader/writer problem
Reader/writer problemReader/writer problem
Reader/writer problem
RinkuMonani
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
Gayathri Gaayu
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structure
Abrish06
 
SEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMSSEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMS
Gokul Hari
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
Jordan Delacruz
 
SPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and FlowchartSPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and Flowchart
Mohammad Imam Hossain
 
Introduction to Algorithms & flow charts
Introduction to Algorithms & flow chartsIntroduction to Algorithms & flow charts
Introduction to Algorithms & flow charts
Yash Gupta
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
Nahid Hasan
 
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
Shail Nakum
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
shameen khan
 
UNIT I LINEAR DATA STRUCTURES – LIST
UNIT I 	LINEAR DATA STRUCTURES – LIST 	UNIT I 	LINEAR DATA STRUCTURES – LIST
UNIT I LINEAR DATA STRUCTURES – LIST
Kathirvel Ayyaswamy
 
Fundamentals of data structures ellis horowitz & sartaj sahni
Fundamentals of data structures   ellis horowitz & sartaj sahniFundamentals of data structures   ellis horowitz & sartaj sahni
Fundamentals of data structures ellis horowitz & sartaj sahni
Hitesh Wagle
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
Nikhil Sharma
 
Reader/writer problem
Reader/writer problemReader/writer problem
Reader/writer problem
RinkuMonani
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
Gayathri Gaayu
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structure
Abrish06
 
SEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMSSEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMS
Gokul Hari
 

Similar to Unit 1 program development cycle (20)

Programming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptxProgramming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptx
TeddyDaka
 
Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptx
shoaibkhan716300
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem sloving
Mani Kandan
 
introduction to problem solving and programming
introduction to problem solving and programmingintroduction to problem solving and programming
introduction to problem solving and programming
chaudhariresham6
 
Programming Development LifeCycle11.pptx
Programming Development LifeCycle11.pptxProgramming Development LifeCycle11.pptx
Programming Development LifeCycle11.pptx
hassanbokhari14
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
praveena p
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptx
ssusera8c91a
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
afifahnailah
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
Appili Vamsi Krishna
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
ManoRanjani30
 
Coding - SDLC Model
Coding - SDLC ModelCoding - SDLC Model
Coding - SDLC Model
Amity University | FMS - DU | IMT | Stratford University | KKMI International Institute | AIMA | DTU
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
Chinnu Edwin
 
CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.ppt
Tekle12
 
Programming C ppt for learning foundations
Programming C ppt for learning foundationsProgramming C ppt for learning foundations
Programming C ppt for learning foundations
ssuser65733f
 
Nota (first)
Nota (first)Nota (first)
Nota (first)
Fariza Zahari
 
c programming 1-1.pptx
c programming 1-1.pptxc programming 1-1.pptx
c programming 1-1.pptx
CHERUKURIYUVARAJU209
 
Overview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptxOverview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptx
BypassFrp
 
Debbuging
DebbugingDebbuging
Debbuging
Iama Marsian
 
COMPUTER 10 QUARTER 1 LESSON 1 K12 LESSON
COMPUTER 10 QUARTER 1 LESSON 1 K12 LESSONCOMPUTER 10 QUARTER 1 LESSON 1 K12 LESSON
COMPUTER 10 QUARTER 1 LESSON 1 K12 LESSON
John Burca
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
Prof. Erwin Globio
 
Programming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptxProgramming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptx
TeddyDaka
 
Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptx
shoaibkhan716300
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem sloving
Mani Kandan
 
introduction to problem solving and programming
introduction to problem solving and programmingintroduction to problem solving and programming
introduction to problem solving and programming
chaudhariresham6
 
Programming Development LifeCycle11.pptx
Programming Development LifeCycle11.pptxProgramming Development LifeCycle11.pptx
Programming Development LifeCycle11.pptx
hassanbokhari14
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
praveena p
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
Appili Vamsi Krishna
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
Chinnu Edwin
 
CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.ppt
Tekle12
 
Programming C ppt for learning foundations
Programming C ppt for learning foundationsProgramming C ppt for learning foundations
Programming C ppt for learning foundations
ssuser65733f
 
Overview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptxOverview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptx
BypassFrp
 
COMPUTER 10 QUARTER 1 LESSON 1 K12 LESSON
COMPUTER 10 QUARTER 1 LESSON 1 K12 LESSONCOMPUTER 10 QUARTER 1 LESSON 1 K12 LESSON
COMPUTER 10 QUARTER 1 LESSON 1 K12 LESSON
John Burca
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
Prof. Erwin Globio
 
Ad

Recently uploaded (20)

All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Ad

Unit 1 program development cycle

  • 1. COB204A62: BUSINESS ANALYTICS PROGRAMMING PROF. DHANAMALAR M DEPARTMENT OF COMPUTER SCIENCE
  • 2. RUNNING PROGRAMS Memory Input Data Program Output Machine language program (executable file) Data entered during execution Computed results C P U • Steps that the computer goes through to run a program:
  • 3. PROGRAM EXECUTION • Steps taken by the CPU to run a program (instructions are in machine language): 1. Fetch an instruction 2. Decode (interpret) the instruction 3. Retrieve data, if needed 4. Execute (perform) actual processing 5. Store the results, if needed
  • 4. PROGRAM ERRORS • Syntax Errors: • Errors in grammar of the language • Runtime error: • When there are no syntax errors, but the program can’t complete execution • Divide by zero • Invalid input data • Logical errors: • The program completes execution, but delivers incorrect results • Incorrect usage of parentheses
  • 6. PROGRAM DEVELOPMENT CYCLE • Many programmers follow a sequence of Steps to create their programs. 1. Analyze – Define the Problem • Make sure that you understand what the program should do. What should the user be able to enter? How? How does the program come up with an answer? What does the program output? How? • User – a person who uses a computer program. • End User – the user that the program was made for. 2. Design – Plan a Solution for the Problem • Develop a PRECISE sequence of steps to solve the problem • An algorithm is a precise sequence of steps to solve a problem.
  • 7. DEVELOP AN ALGORITHM • Imagine you want a program that tells a user how many stamps they need in order to mail a certain number of pages. • You need one stamp for every 5 pages • 6 pages = 2 stamps • 12 pages = 3 stamps • … • Write an algorithm (the steps needed) to solve this problem
  • 8. PROGRAM DEVELOPMENT CYCLE – DESIGN (CONTINUED) • Typically a program follows three general steps 1. Input 2. Processing (Formulas) 3. Output
  • 9. DEVELOP AN ALGORITHM, 2ND ATTEMPT • OK, with this knowledge, try writing the algorithm again
  • 10. PROGRAM DEVELOPMENT CYCLE – DESIGN (CONTINUED) • Are those three steps enough? • What about if the user enters “Banana” instead of a number of sheets? • The program does not know how to find the number of stamps required to mail “Banana” number of sheets • In order for the program to run without crashing, our algorithm must make sure that the user inputs some valid data. • There are two main ways of doing this: 1. Prevention – Making sure that the user is not physically able to enter in invalid data. 2. Validation – Allowing the user to enter invalid data, but checking it to make sure it is valid before processing.
  • 11. PROGRAM DEVELOPMENT CYCLE – DESIGN (CONTINUED) • So, there are really 4 general steps most programs follow: 1. Input 1. Read Input 2. Validate Input 2. Process 3. Output
  • 12. DEVELOP AN ALGORITHM, 3RD ATTEMPT • OK, now with THAT information, try developing the algorithm • One good algorithm developed could look like this: 1. Request the number of sheets of paper from the user; call it Sheets (Input/Read) 2. Make sure Sheets is a positive whole number (Input/Validation) 3. Divide Sheets by 5 (Processing) 4. Round the result from step 3 up to the highest whole number; call it Stamps (Processing) 5. Reply with the number Stamps (Output)
  • 13. PROGRAMMING TOOLS • Flowcharts – A chart that consists of symbols connected by arrows. Within each symbol is a phrase presenting the activity at that step. The shape of the symbol indicates the type of operation that is to occur. • Hierarchy Charts – A chart that shows the overall program structure. These charts describe what each part, or module, does and how they are related. These modules intentionally omit details of how they work. • Pseudocode – an abbreviated plain English version of actual computer code. Kind of a mix between English and code. THERE IS NO OFFICIAL SYNTAX TO PSEUDOCODE.
  • 14. STAMPS FLOWCHART Yes No Start Read Sheets Is sheets a positive whole number? Display Error Message Set Stamps = Sheets/5 Round Stamps to nearest whole number Display Stamps End
  • 16. PROGRAM DEVELOPMENT CYCLE 3. Write the Code – Implement a solution • The instructions in a programming language collectively called code. • Your code should be a translation of your algorithm developed into the programming language. • In this class we use Java, but there are many other programming languages: C, C++, C#, Ruby, Python, Visual Basic, etc. • This is the major focus of this course, but note that you need to be able to think algorithmically in order to do this. • Meaning, you need to be able to logically solve the problem in order to write a program for it.
  • 17. PROGRAM DEVELOPMENT CYCLE 4. Testing and Debugging – Locate and remove any errors in the program • Testing is the process of finding errors in a program • Debugging is the process of removing errors in a program. • An error in a program is called a bug. • We will talk more specifically about the kinds of errors that can occur in a program once we start programming.
  • 18. PROGRAM DEVELOPMENT CYCLE 5. Complete All Documentation – Organize the material that describes the program. • Documentation is any material whose purpose is to allow another person or programmer to use or understand the program • Two kinds of documentation: 1. External Documentation – Material outside of the code files that describe the program. 2. Internal Documentation – Lines inside of a code file that do nothing except describe details of the program. In Java, these are called comments.
  • 19. 5. Maintenance: • Updating and correction of the program for changed conditions and field experience is accounted for in maintenance. • Maintenance becomes essential in following situations: • Change in specification, • Change in equipment, • Errors which are found during the actual execution of the program.
  • 20. Uses of Computer Programs • Today computer programs are being used in almost every field, household, agriculture, medical, entertainment, defense, communication, etc. Listed below are a few applications of computer programs − • MS Word, MS Excel, Adobe Photoshop, Internet Explorer, Chrome, etc., are examples of computer programs. • Computer programs are being used to develop graphics and special effects in movie making. • Computer programs are being used to perform Ultrasounds, X-Rays, and other medical examinations. • Computer programs are being used in our mobile phones for SMS, Chat, and voice communication.
  翻译: