SlideShare une entreprise Scribd logo
1  sur  39
About the Presentations 
• The presentations cover the objectives found in the 
opening of each chapter. 
• All chapter objectives are listed in the beginning of 
each presentation. 
• You may customize the presentations to fit your 
class needs. 
• Some figures from the chapters are included. A 
complete set of images from the book can be found 
on the Instructor Resources disc. 
1
A Beginner’s Guide to 
Programming Logic, 
Introductory 
Chapter 1 
An Overview of Computers and 
Programming
Objectives 
In this chapter, you will learn about: 
• Computer systems 
• Simple program logic 
• The steps involved in the program development 
cycle 
• Pseudocode statements and flowchart symbols 
• Using a sentinel value to end a program 
• Programming and user environments 
• The evolution of programming models 
A Beginner's Guide to Programming Logic, Introductory 3
Understanding Computer Systems 
• Computer system 
– Combination of all the components required to 
process and store data using a computer 
• Hardware 
– Equipment associated with a computer 
• Software 
– Computer instructions 
– Tell the hardware what to do 
– Programs 
• Instructions written by programmers 
A Beginner's Guide to Programming Logic, Introductory 4
Understanding Computer Systems 
(continued) 
• Programming 
– Writing software instructions 
• Computer hardware and software accomplish three 
major operations 
– Input 
• Data items enter computer 
– Processing 
• By central processing unit (CPU) 
– Output 
A Beginner's Guide to Programming Logic, Introductory 5
Understanding Computer Systems 
(continued) 
• Programming language 
– Use to write computer instructions 
– Examples 
• Visual Basic, C#, C++, or Java 
• Syntax 
– Rules governing its word usage and punctuation 
• Computer memory 
– Computer’s temporary, internal storage 
– Volatile 
A Beginner's Guide to Programming Logic, Introductory 6
Understanding Computer Systems 
(continued) 
• Permanent storage devices 
– Nonvolatile 
• Compiler or an interpreter 
– Translates program code into machine language 
(binary language) 
– Checks for syntax errors 
• Program executes or runs 
– Input will be accepted, some processing will occur, 
and results will be output 
A Beginner's Guide to Programming Logic, Introductory 7
Understanding Simple Program Logic 
• Program with syntax errors cannot execute 
• Logical errors 
– Errors in program logic 
– Produce incorrect output as a result 
• Logic of the computer program 
– Sequence of specific instructions in specific order 
• Variable 
– Named memory location whose value can vary 
A Beginner's Guide to Programming Logic, Introductory 8
Understanding the Program 
Development Cycle 
• Program development cycle 
– Understand the problem 
– Plan the logic 
– Code the program 
– Use software (a compiler or interpreter) to translate 
the program into machine language 
– Test the program 
– Put the program into production 
– Maintain the program 
A Beginner's Guide to Programming Logic, Introductory 9
Understanding the Program 
Development Cycle (continued) 
Figure 1-1 The program development cycle 
A Beginner's Guide to Programming Logic, Introductory 10
Understanding the Problem 
• One of the most difficult aspects of programming 
• Users or end users 
– People for whom program is written 
• Documentation 
– Supporting paperwork for a program 
A Beginner's Guide to Programming Logic, Introductory 11
Planning the Logic 
• Heart of the programming process 
• Most common planning tools 
– Flowcharts 
– Pseudocode 
• Desk-checking 
– Walking through a program’s logic on paper before 
you actually write the program 
A Beginner's Guide to Programming Logic, Introductory 12
Coding the Program 
• Hundreds of programming languages are available 
– Choose based on features 
– Alike in their basic capabilities 
• Easier than planning step 
A Beginner's Guide to Programming Logic, Introductory 13
Using Software to Translate the 
Program into Machine Language 
• Translator program 
– Compiler or interpreter 
– Changes the programmer’s English-like high-level 
programming language into the low-level 
machine language 
• Syntax error 
– Misuse of a language’s grammar rules 
– Programmer corrects listed syntax errors 
– Might need to recompile the code several times 
A Beginner's Guide to Programming Logic, Introductory 14
Using Software to Translate the 
Program into Machine Language 
(continued) 
Figure 1-2 Creating an executable program 
A Beginner's Guide to Programming Logic, Introductory 15
Testing the Program 
• Logical error 
– Use a syntactically correct statement but use the 
wrong one for the current context 
• Test 
– Execute the program with some sample data to see 
whether the results are logically correct 
• Programs should be tested with many sets of data 
A Beginner's Guide to Programming Logic, Introductory 16
Putting the Program into Production 
• Process depends on program’s purpose 
– May take several months 
• Conversion 
– Entire set of actions an organization must take to 
switch over to using a new program or set of 
programs 
A Beginner's Guide to Programming Logic, Introductory 17
Maintaining the Program 
• Maintenance 
– Making changes after program is put into production 
• Common first programming job 
– Maintaining previously written programs 
• Make changes to existing programs 
– Repeat the development cycle 
A Beginner's Guide to Programming Logic, Introductory 18
Using Pseudocode Statements 
and Flowchart Symbols 
• Pseudocode 
– English-like representation of the logical steps it 
takes to solve a problem 
• Flowchart 
– Pictorial representation of the logical steps it takes to 
solve a problem 
A Beginner's Guide to Programming Logic, Introductory 19
Writing Pseudocode 
• Pseudocode representation of a number-doubling 
problem 
start 
input myNumber 
set myAnswer = myNumber * 2 
output myAnswer 
stop 
A Beginner's Guide to Programming Logic, Introductory 20
Writing Pseudocode (continued) 
• Programmers preface their pseudocode with a 
beginning statement like start and end it with a 
terminating statement like stop 
• Flexible because it is a planning tool 
A Beginner's Guide to Programming Logic, Introductory 21
Drawing Flowcharts 
• Create a flowchart 
– Draw geometric shapes that contain the individual 
statements 
– Connect shapes with arrows 
• Input symbol 
– Indicates input operation 
– Parallelogram 
• Processing symbol 
– Processing statements such as arithmetic 
– Rectangle 
A Beginner's Guide to Programming Logic, Introductory 22
Drawing Flowcharts (continued) 
• Output symbol 
– Represents output statements 
– Parallelogram 
• Flowlines 
– Arrows that connect steps 
• Terminal symbols 
– Start/stop symbols 
– Shaped like a racetrack 
– Also called lozenge 
A Beginner's Guide to Programming Logic, Introductory 23
Drawing Flowcharts (continued) 
Figure 1-6 Flowchart and pseudocode of program that doubles a number 
A Beginner's Guide to Programming Logic, Introductory 24
Repeating Instructions 
• After the flowchart or pseudocode has been 
developed, the programmer only needs to: 
– Buy a computer 
– Buy a language compiler 
– Learn a programming language 
– Code the program 
– Attempt to compile it 
– Fix the syntax errors 
– Compile it again 
– Test it with several sets of data 
– Put it into production 
A Beginner's Guide to Programming Logic, Introductory 25
Repeating Instructions (continued) 
• Loop 
– Repetition of a series of steps 
• Infinite loop 
– Repeating flow of logic with no end 
A Beginner's Guide to Programming Logic, Introductory 26
Repeating Instructions (continued) 
Figure 1-8 Flowchart of infinite number-doubling program 
A Beginner's Guide to Programming Logic, Introductory 27
Using a Sentinel Value to End 
a Program 
• Making a decision 
– Testing a value 
– Decision symbol 
• Diamond shape 
• Dummy value 
– Data-entry value that the user will never need 
– Sentinel value 
• eof (“end of file”) 
– Marker at the end of a file that automatically acts as 
a sentinel 
A Beginner's Guide to Programming Logic, Introductory 28
Using a Sentinel Value to End 
a Program (continued) 
Figure 1-9 Flowchart of number-doubling program with sentinel value of 0 
A Beginner's Guide to Programming Logic, Introductory 29
Using a Sentinel Value to End 
a Program (continued) 
Figure 1-10 Flowchart using eof 
A Beginner's Guide to Programming Logic, Introductory 30
Understanding Programming 
and User Environments 
• Many options for programming and user 
environments 
A Beginner's Guide to Programming Logic, Introductory 31
Understanding Programming 
Environments 
• Use a keyboard to type program statements into an 
editor 
– Plain text editor 
• Similar to a word processor but without as many 
features 
– Text editor that is part of an integrated 
development environment (IDE) 
• Software package that provides an editor, compiler, 
and other programming tools 
A Beginner's Guide to Programming Logic, Introductory 32
Understanding Programming 
Environments (continued) 
Figure 1-12 A C# number-doubling program in Visual Studio 
A Beginner's Guide to Programming Logic, Introductory 33
Understanding User Environments 
• Command line 
– Location on your computer screen at which you type 
text entries to communicate with the computer’s 
operating system 
• Graphical user interface (GUI) 
– Allows users to interact with a program in a graphical 
environment 
A Beginner's Guide to Programming Logic, Introductory 34
Understanding User Environments 
(continued) 
Figure 1-13 Executing a number-doubling program 
in a command-line environment 
A Beginner's Guide to Programming Logic, Introductory 35
Understanding User Environments 
(continued) 
Figure 1-14 Executing a number-doubling program in a GUI environment 
A Beginner's Guide to Programming Logic, Introductory 36
Understanding the Evolution 
of Programming Models 
• People have been writing modern computer 
programs since the 1940s 
• Newer programming languages 
– Look much more like natural language 
– Easier to use 
– Create self-contained modules or program segments 
that can be pieced together in a variety of ways 
A Beginner's Guide to Programming Logic, Introductory 37
Understanding the Evolution 
of Programming Models (continued) 
• Major models or paradigms used by programmers 
– Procedural programming 
• Focuses on the procedures that programmers create 
– Object-oriented programming 
• Focuses on objects, or “things,” and describes their 
features (or attributes) and their behaviors 
– Major difference 
• Focus the programmer takes during the earliest 
planning stages of a project 
A Beginner's Guide to Programming Logic, Introductory 38
Summary 
• Computer programming 
– Requires specific syntax 
– Must develop correct logic 
• Programmer’s job 
– Understanding the problem, planning the logic, 
coding the program, translating the program into 
machine language, testing the program, putting the 
program into production, and maintaining it 
• Procedural and object-oriented programmers 
approach problems differently 
A Beginner's Guide to Programming Logic, Introductory 39

Contenu connexe

Tendances

Ict 9 module 4, lesson 1.3 diagnosing computer systems
Ict 9 module 4, lesson 1.3 diagnosing computer systemsIct 9 module 4, lesson 1.3 diagnosing computer systems
Ict 9 module 4, lesson 1.3 diagnosing computer systemsYonel Cadapan
 
Chapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to ProgrammingChapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to Programmingmshellman
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programmingNSU-Biliran Campus
 
Programming Fundamentals lecture 2
Programming Fundamentals lecture 2Programming Fundamentals lecture 2
Programming Fundamentals lecture 2REHAN IJAZ
 
Chapter 7 basics of computational thinking
Chapter 7 basics of computational thinkingChapter 7 basics of computational thinking
Chapter 7 basics of computational thinkingPraveen M Jigajinni
 
Grade 10 introduction and history of programming
Grade 10   introduction and history of programmingGrade 10   introduction and history of programming
Grade 10 introduction and history of programmingRafael Balderosa
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming ConceptsJussi Pohjolainen
 
Pseudocode flowcharts
Pseudocode flowchartsPseudocode flowcharts
Pseudocode flowchartsnicky_walters
 
How to format a computer windows 7
How to format a computer windows 7How to format a computer windows 7
How to format a computer windows 7Md Aftab
 
Fundamentals of programming final
Fundamentals of programming finalFundamentals of programming final
Fundamentals of programming finalRicky Recto
 
Chapter 1 fundamentals of digital imaging
Chapter 1  fundamentals of digital imagingChapter 1  fundamentals of digital imaging
Chapter 1 fundamentals of digital imagingZCELPROPS
 
CIS110 Computer Programming Design Chapter (2)
CIS110 Computer Programming Design Chapter  (2)CIS110 Computer Programming Design Chapter  (2)
CIS110 Computer Programming Design Chapter (2)Dr. Ahmed Al Zaidy
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchartJordan Delacruz
 

Tendances (20)

Ict 9 module 4, lesson 1.3 diagnosing computer systems
Ict 9 module 4, lesson 1.3 diagnosing computer systemsIct 9 module 4, lesson 1.3 diagnosing computer systems
Ict 9 module 4, lesson 1.3 diagnosing computer systems
 
Chapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to ProgrammingChapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to Programming
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
Programming Fundamentals lecture 2
Programming Fundamentals lecture 2Programming Fundamentals lecture 2
Programming Fundamentals lecture 2
 
Chapter 7 basics of computational thinking
Chapter 7 basics of computational thinkingChapter 7 basics of computational thinking
Chapter 7 basics of computational thinking
 
Grade 10 introduction and history of programming
Grade 10   introduction and history of programmingGrade 10   introduction and history of programming
Grade 10 introduction and history of programming
 
History of programming
History of programmingHistory of programming
History of programming
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
 
Pseudocode flowcharts
Pseudocode flowchartsPseudocode flowcharts
Pseudocode flowcharts
 
How to format a computer windows 7
How to format a computer windows 7How to format a computer windows 7
How to format a computer windows 7
 
Fundamentals of programming final
Fundamentals of programming finalFundamentals of programming final
Fundamentals of programming final
 
Computer Programming
Computer ProgrammingComputer Programming
Computer Programming
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Computer
ComputerComputer
Computer
 
Chapter 1 fundamentals of digital imaging
Chapter 1  fundamentals of digital imagingChapter 1  fundamentals of digital imaging
Chapter 1 fundamentals of digital imaging
 
Computer programming concepts
Computer programming conceptsComputer programming concepts
Computer programming concepts
 
CIS110 Computer Programming Design Chapter (2)
CIS110 Computer Programming Design Chapter  (2)CIS110 Computer Programming Design Chapter  (2)
CIS110 Computer Programming Design Chapter (2)
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
 
Software Metrics
Software MetricsSoftware Metrics
Software Metrics
 
COMPUTER PROGRAMMING
COMPUTER PROGRAMMINGCOMPUTER PROGRAMMING
COMPUTER PROGRAMMING
 

En vedette

PROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATIONPROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATIONJoland Reambillo
 
Komunikasyon
KomunikasyonKomunikasyon
Komunikasyondeathful
 
Aralin sa Pakikinig
Aralin sa PakikinigAralin sa Pakikinig
Aralin sa Pakikinigdeathful
 
Mga Modelo ng Komunikasyon
Mga Modelo ng KomunikasyonMga Modelo ng Komunikasyon
Mga Modelo ng Komunikasyondeathful
 
Real Numbers
Real NumbersReal Numbers
Real Numbersdeathful
 

En vedette (6)

PROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATIONPROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATION
 
Komunikasyon
KomunikasyonKomunikasyon
Komunikasyon
 
The End of Job Descriptions
The End of Job DescriptionsThe End of Job Descriptions
The End of Job Descriptions
 
Aralin sa Pakikinig
Aralin sa PakikinigAralin sa Pakikinig
Aralin sa Pakikinig
 
Mga Modelo ng Komunikasyon
Mga Modelo ng KomunikasyonMga Modelo ng Komunikasyon
Mga Modelo ng Komunikasyon
 
Real Numbers
Real NumbersReal Numbers
Real Numbers
 

Similaire à Logic Formulation 1

chapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdfchapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdfBernardVelasco1
 
CIS110 Computer Programming Design Chapter (1)
CIS110 Computer Programming Design Chapter  (1)CIS110 Computer Programming Design Chapter  (1)
CIS110 Computer Programming Design Chapter (1)Dr. Ahmed Al Zaidy
 
ProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdfProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdflailoesakhan
 
CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.pptTekle12
 
LESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm dfLESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm dfAparnaPriyadarsiniMe
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing TechniquesAppili Vamsi Krishna
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem slovingMani Kandan
 
Introduction to computer programming.pdf
Introduction to computer programming.pdfIntroduction to computer programming.pdf
Introduction to computer programming.pdfHasankaNayanjith
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterHossam Hassan
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfMMRF2
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptxPmarkNorcio
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow chartsChinnu Edwin
 

Similaire à Logic Formulation 1 (20)

Chap1
Chap1Chap1
Chap1
 
chapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdfchapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdf
 
CIS110 Computer Programming Design Chapter (1)
CIS110 Computer Programming Design Chapter  (1)CIS110 Computer Programming Design Chapter  (1)
CIS110 Computer Programming Design Chapter (1)
 
ProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdfProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdf
 
Cs111 ch01 v4
Cs111 ch01 v4Cs111 ch01 v4
Cs111 ch01 v4
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
 
CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.ppt
 
Chapter 4 computer language
Chapter 4 computer languageChapter 4 computer language
Chapter 4 computer language
 
LESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm dfLESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm df
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
DMA113 Chap1
DMA113 Chap1DMA113 Chap1
DMA113 Chap1
 
Nota (first)
Nota (first)Nota (first)
Nota (first)
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem sloving
 
Introduction to computer programming.pdf
Introduction to computer programming.pdfIntroduction to computer programming.pdf
Introduction to computer programming.pdf
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
Week10 final
Week10 finalWeek10 final
Week10 final
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
 

Plus de deathful

Wastong Gamit ng mga Salita
Wastong Gamit ng mga SalitaWastong Gamit ng mga Salita
Wastong Gamit ng mga Salitadeathful
 
UST ICS Freshmen Orientation
UST ICS Freshmen OrientationUST ICS Freshmen Orientation
UST ICS Freshmen Orientationdeathful
 
College Algebra
College AlgebraCollege Algebra
College Algebradeathful
 
Special Products
Special ProductsSpecial Products
Special Productsdeathful
 
Theories About Light
Theories About LightTheories About Light
Theories About Lightdeathful
 
Provision For Depreciation
Provision For DepreciationProvision For Depreciation
Provision For Depreciationdeathful
 
Acid-Base Titration & Calculations
Acid-Base Titration & CalculationsAcid-Base Titration & Calculations
Acid-Base Titration & Calculationsdeathful
 
Microbiology Techniques
Microbiology TechniquesMicrobiology Techniques
Microbiology Techniquesdeathful
 
Streak Plating
Streak PlatingStreak Plating
Streak Platingdeathful
 
Egg Windowing
Egg WindowingEgg Windowing
Egg Windowingdeathful
 
Egg Injection
Egg InjectionEgg Injection
Egg Injectiondeathful
 
Colony Counter Compatibility Mode
Colony Counter Compatibility ModeColony Counter Compatibility Mode
Colony Counter Compatibility Modedeathful
 
Isolating Chromosomes
Isolating ChromosomesIsolating Chromosomes
Isolating Chromosomesdeathful
 
Aseptic Technique
Aseptic TechniqueAseptic Technique
Aseptic Techniquedeathful
 
Agar Culture Medium
Agar Culture MediumAgar Culture Medium
Agar Culture Mediumdeathful
 
Allium Cepa Genotoxicity Test
Allium Cepa Genotoxicity TestAllium Cepa Genotoxicity Test
Allium Cepa Genotoxicity Testdeathful
 
Tilapia Nilotica As A Biological Indicator
Tilapia Nilotica As A Biological IndicatorTilapia Nilotica As A Biological Indicator
Tilapia Nilotica As A Biological Indicatordeathful
 
Pagkonsumo
PagkonsumoPagkonsumo
Pagkonsumodeathful
 

Plus de deathful (19)

Wastong Gamit ng mga Salita
Wastong Gamit ng mga SalitaWastong Gamit ng mga Salita
Wastong Gamit ng mga Salita
 
UST ICS Freshmen Orientation
UST ICS Freshmen OrientationUST ICS Freshmen Orientation
UST ICS Freshmen Orientation
 
College Algebra
College AlgebraCollege Algebra
College Algebra
 
Special Products
Special ProductsSpecial Products
Special Products
 
Theories About Light
Theories About LightTheories About Light
Theories About Light
 
Provision For Depreciation
Provision For DepreciationProvision For Depreciation
Provision For Depreciation
 
Acid-Base Titration & Calculations
Acid-Base Titration & CalculationsAcid-Base Titration & Calculations
Acid-Base Titration & Calculations
 
Microbiology Techniques
Microbiology TechniquesMicrobiology Techniques
Microbiology Techniques
 
Streak Plating
Streak PlatingStreak Plating
Streak Plating
 
Egg Windowing
Egg WindowingEgg Windowing
Egg Windowing
 
Egg Injection
Egg InjectionEgg Injection
Egg Injection
 
Colony Counter Compatibility Mode
Colony Counter Compatibility ModeColony Counter Compatibility Mode
Colony Counter Compatibility Mode
 
Isolating Chromosomes
Isolating ChromosomesIsolating Chromosomes
Isolating Chromosomes
 
Autoclave
AutoclaveAutoclave
Autoclave
 
Aseptic Technique
Aseptic TechniqueAseptic Technique
Aseptic Technique
 
Agar Culture Medium
Agar Culture MediumAgar Culture Medium
Agar Culture Medium
 
Allium Cepa Genotoxicity Test
Allium Cepa Genotoxicity TestAllium Cepa Genotoxicity Test
Allium Cepa Genotoxicity Test
 
Tilapia Nilotica As A Biological Indicator
Tilapia Nilotica As A Biological IndicatorTilapia Nilotica As A Biological Indicator
Tilapia Nilotica As A Biological Indicator
 
Pagkonsumo
PagkonsumoPagkonsumo
Pagkonsumo
 

Dernier

Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf203318pmpc
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 

Dernier (20)

Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 

Logic Formulation 1

  • 1. About the Presentations • The presentations cover the objectives found in the opening of each chapter. • All chapter objectives are listed in the beginning of each presentation. • You may customize the presentations to fit your class needs. • Some figures from the chapters are included. A complete set of images from the book can be found on the Instructor Resources disc. 1
  • 2. A Beginner’s Guide to Programming Logic, Introductory Chapter 1 An Overview of Computers and Programming
  • 3. Objectives In this chapter, you will learn about: • Computer systems • Simple program logic • The steps involved in the program development cycle • Pseudocode statements and flowchart symbols • Using a sentinel value to end a program • Programming and user environments • The evolution of programming models A Beginner's Guide to Programming Logic, Introductory 3
  • 4. Understanding Computer Systems • Computer system – Combination of all the components required to process and store data using a computer • Hardware – Equipment associated with a computer • Software – Computer instructions – Tell the hardware what to do – Programs • Instructions written by programmers A Beginner's Guide to Programming Logic, Introductory 4
  • 5. Understanding Computer Systems (continued) • Programming – Writing software instructions • Computer hardware and software accomplish three major operations – Input • Data items enter computer – Processing • By central processing unit (CPU) – Output A Beginner's Guide to Programming Logic, Introductory 5
  • 6. Understanding Computer Systems (continued) • Programming language – Use to write computer instructions – Examples • Visual Basic, C#, C++, or Java • Syntax – Rules governing its word usage and punctuation • Computer memory – Computer’s temporary, internal storage – Volatile A Beginner's Guide to Programming Logic, Introductory 6
  • 7. Understanding Computer Systems (continued) • Permanent storage devices – Nonvolatile • Compiler or an interpreter – Translates program code into machine language (binary language) – Checks for syntax errors • Program executes or runs – Input will be accepted, some processing will occur, and results will be output A Beginner's Guide to Programming Logic, Introductory 7
  • 8. Understanding Simple Program Logic • Program with syntax errors cannot execute • Logical errors – Errors in program logic – Produce incorrect output as a result • Logic of the computer program – Sequence of specific instructions in specific order • Variable – Named memory location whose value can vary A Beginner's Guide to Programming Logic, Introductory 8
  • 9. Understanding the Program Development Cycle • Program development cycle – Understand the problem – Plan the logic – Code the program – Use software (a compiler or interpreter) to translate the program into machine language – Test the program – Put the program into production – Maintain the program A Beginner's Guide to Programming Logic, Introductory 9
  • 10. Understanding the Program Development Cycle (continued) Figure 1-1 The program development cycle A Beginner's Guide to Programming Logic, Introductory 10
  • 11. Understanding the Problem • One of the most difficult aspects of programming • Users or end users – People for whom program is written • Documentation – Supporting paperwork for a program A Beginner's Guide to Programming Logic, Introductory 11
  • 12. Planning the Logic • Heart of the programming process • Most common planning tools – Flowcharts – Pseudocode • Desk-checking – Walking through a program’s logic on paper before you actually write the program A Beginner's Guide to Programming Logic, Introductory 12
  • 13. Coding the Program • Hundreds of programming languages are available – Choose based on features – Alike in their basic capabilities • Easier than planning step A Beginner's Guide to Programming Logic, Introductory 13
  • 14. Using Software to Translate the Program into Machine Language • Translator program – Compiler or interpreter – Changes the programmer’s English-like high-level programming language into the low-level machine language • Syntax error – Misuse of a language’s grammar rules – Programmer corrects listed syntax errors – Might need to recompile the code several times A Beginner's Guide to Programming Logic, Introductory 14
  • 15. Using Software to Translate the Program into Machine Language (continued) Figure 1-2 Creating an executable program A Beginner's Guide to Programming Logic, Introductory 15
  • 16. Testing the Program • Logical error – Use a syntactically correct statement but use the wrong one for the current context • Test – Execute the program with some sample data to see whether the results are logically correct • Programs should be tested with many sets of data A Beginner's Guide to Programming Logic, Introductory 16
  • 17. Putting the Program into Production • Process depends on program’s purpose – May take several months • Conversion – Entire set of actions an organization must take to switch over to using a new program or set of programs A Beginner's Guide to Programming Logic, Introductory 17
  • 18. Maintaining the Program • Maintenance – Making changes after program is put into production • Common first programming job – Maintaining previously written programs • Make changes to existing programs – Repeat the development cycle A Beginner's Guide to Programming Logic, Introductory 18
  • 19. Using Pseudocode Statements and Flowchart Symbols • Pseudocode – English-like representation of the logical steps it takes to solve a problem • Flowchart – Pictorial representation of the logical steps it takes to solve a problem A Beginner's Guide to Programming Logic, Introductory 19
  • 20. Writing Pseudocode • Pseudocode representation of a number-doubling problem start input myNumber set myAnswer = myNumber * 2 output myAnswer stop A Beginner's Guide to Programming Logic, Introductory 20
  • 21. Writing Pseudocode (continued) • Programmers preface their pseudocode with a beginning statement like start and end it with a terminating statement like stop • Flexible because it is a planning tool A Beginner's Guide to Programming Logic, Introductory 21
  • 22. Drawing Flowcharts • Create a flowchart – Draw geometric shapes that contain the individual statements – Connect shapes with arrows • Input symbol – Indicates input operation – Parallelogram • Processing symbol – Processing statements such as arithmetic – Rectangle A Beginner's Guide to Programming Logic, Introductory 22
  • 23. Drawing Flowcharts (continued) • Output symbol – Represents output statements – Parallelogram • Flowlines – Arrows that connect steps • Terminal symbols – Start/stop symbols – Shaped like a racetrack – Also called lozenge A Beginner's Guide to Programming Logic, Introductory 23
  • 24. Drawing Flowcharts (continued) Figure 1-6 Flowchart and pseudocode of program that doubles a number A Beginner's Guide to Programming Logic, Introductory 24
  • 25. Repeating Instructions • After the flowchart or pseudocode has been developed, the programmer only needs to: – Buy a computer – Buy a language compiler – Learn a programming language – Code the program – Attempt to compile it – Fix the syntax errors – Compile it again – Test it with several sets of data – Put it into production A Beginner's Guide to Programming Logic, Introductory 25
  • 26. Repeating Instructions (continued) • Loop – Repetition of a series of steps • Infinite loop – Repeating flow of logic with no end A Beginner's Guide to Programming Logic, Introductory 26
  • 27. Repeating Instructions (continued) Figure 1-8 Flowchart of infinite number-doubling program A Beginner's Guide to Programming Logic, Introductory 27
  • 28. Using a Sentinel Value to End a Program • Making a decision – Testing a value – Decision symbol • Diamond shape • Dummy value – Data-entry value that the user will never need – Sentinel value • eof (“end of file”) – Marker at the end of a file that automatically acts as a sentinel A Beginner's Guide to Programming Logic, Introductory 28
  • 29. Using a Sentinel Value to End a Program (continued) Figure 1-9 Flowchart of number-doubling program with sentinel value of 0 A Beginner's Guide to Programming Logic, Introductory 29
  • 30. Using a Sentinel Value to End a Program (continued) Figure 1-10 Flowchart using eof A Beginner's Guide to Programming Logic, Introductory 30
  • 31. Understanding Programming and User Environments • Many options for programming and user environments A Beginner's Guide to Programming Logic, Introductory 31
  • 32. Understanding Programming Environments • Use a keyboard to type program statements into an editor – Plain text editor • Similar to a word processor but without as many features – Text editor that is part of an integrated development environment (IDE) • Software package that provides an editor, compiler, and other programming tools A Beginner's Guide to Programming Logic, Introductory 32
  • 33. Understanding Programming Environments (continued) Figure 1-12 A C# number-doubling program in Visual Studio A Beginner's Guide to Programming Logic, Introductory 33
  • 34. Understanding User Environments • Command line – Location on your computer screen at which you type text entries to communicate with the computer’s operating system • Graphical user interface (GUI) – Allows users to interact with a program in a graphical environment A Beginner's Guide to Programming Logic, Introductory 34
  • 35. Understanding User Environments (continued) Figure 1-13 Executing a number-doubling program in a command-line environment A Beginner's Guide to Programming Logic, Introductory 35
  • 36. Understanding User Environments (continued) Figure 1-14 Executing a number-doubling program in a GUI environment A Beginner's Guide to Programming Logic, Introductory 36
  • 37. Understanding the Evolution of Programming Models • People have been writing modern computer programs since the 1940s • Newer programming languages – Look much more like natural language – Easier to use – Create self-contained modules or program segments that can be pieced together in a variety of ways A Beginner's Guide to Programming Logic, Introductory 37
  • 38. Understanding the Evolution of Programming Models (continued) • Major models or paradigms used by programmers – Procedural programming • Focuses on the procedures that programmers create – Object-oriented programming • Focuses on objects, or “things,” and describes their features (or attributes) and their behaviors – Major difference • Focus the programmer takes during the earliest planning stages of a project A Beginner's Guide to Programming Logic, Introductory 38
  • 39. Summary • Computer programming – Requires specific syntax – Must develop correct logic • Programmer’s job – Understanding the problem, planning the logic, coding the program, translating the program into machine language, testing the program, putting the program into production, and maintaining it • Procedural and object-oriented programmers approach problems differently A Beginner's Guide to Programming Logic, Introductory 39