SlideShare a Scribd company logo
1 of 31
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

2
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

3
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

4
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

5
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

6
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

7
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

8
Understanding the Program
Development Cycle (continued)

Figure 1-1 The program development cycle

A Beginner's Guide to Programming Logic, Introductory

9
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

10
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

11
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

12
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

13
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

14
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

15
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

16
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

17
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

18
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

19
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

20
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

21
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

22
Drawing Flowcharts (continued)

Figure 1-6 Flowchart and pseudocode of program that doubles a number

A Beginner's Guide to Programming Logic, Introductory

23
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

31
Understanding Programming
Environments (continued)

Figure 1-12 A C# number-doubling program in Visual Studio
A Beginner's Guide to Programming Logic, Introductory

32
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

33
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

34
Understanding User Environments
(continued)

Figure 1-14 Executing a number-doubling program in a GUI environment

A Beginner's Guide to Programming Logic, Introductory

35
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

36
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

37
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

38

More Related Content

What's hot

Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Arslan Hussain
 
Logic Formulation 2
Logic Formulation 2Logic Formulation 2
Logic Formulation 2deathful
 
Program design and problem solving techniques
Program design and problem solving techniquesProgram design and problem solving techniques
Program design and problem solving techniquesDokka Srinivasu
 
Computer architecture
Computer architectureComputer architecture
Computer architectureZuhaib Zaroon
 
Comso c++
Comso c++Comso c++
Comso c++Mi L
 
Programming languages
Programming languagesProgramming languages
Programming languagesSimon Mui
 
Accounting in erp
Accounting in erp Accounting in erp
Accounting in erp Avi Nash
 
Chapter 13 programming languages and program development
Chapter 13   programming languages and program developmentChapter 13   programming languages and program development
Chapter 13 programming languages and program developmenthaider ali
 
Chapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to ProgrammingChapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to Programmingmshellman
 
Generations of programming_language.kum_ari11-1-1-1
Generations of programming_language.kum_ari11-1-1-1Generations of programming_language.kum_ari11-1-1-1
Generations of programming_language.kum_ari11-1-1-1lakshmi kumari neelapu
 
A History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdfA History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdfSohaib Roomi
 
Programming language
Programming languageProgramming language
Programming languageShuja Qais
 
Introduction with Programming Language
Introduction with Programming LanguageIntroduction with Programming Language
Introduction with Programming LanguageSaroar Zahan Sojib
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)nikeAthena
 
What is programming what are its benefits
What is programming  what are its benefits What is programming  what are its benefits
What is programming what are its benefits Vijay Singh Khatri
 
Chapter 5: Accounting in ERP Systems
Chapter 5: Accounting in ERP SystemsChapter 5: Accounting in ERP Systems
Chapter 5: Accounting in ERP SystemsQuang Ngoc
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow chartsChinnu Edwin
 

What's hot (20)

Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
 
Logic Formulation 2
Logic Formulation 2Logic Formulation 2
Logic Formulation 2
 
Program design and problem solving techniques
Program design and problem solving techniquesProgram design and problem solving techniques
Program design and problem solving techniques
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Comso c++
Comso c++Comso c++
Comso c++
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Computer
ComputerComputer
Computer
 
Accounting in erp
Accounting in erp Accounting in erp
Accounting in erp
 
Chapter 13 programming languages and program development
Chapter 13   programming languages and program developmentChapter 13   programming languages and program development
Chapter 13 programming languages and program development
 
Chapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to ProgrammingChapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to Programming
 
Generations of programming_language.kum_ari11-1-1-1
Generations of programming_language.kum_ari11-1-1-1Generations of programming_language.kum_ari11-1-1-1
Generations of programming_language.kum_ari11-1-1-1
 
C language unit-1
C language unit-1C language unit-1
C language unit-1
 
A History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdfA History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdf
 
Programming language
Programming languageProgramming language
Programming language
 
Process Models IN software Engineering
Process Models IN software EngineeringProcess Models IN software Engineering
Process Models IN software Engineering
 
Introduction with Programming Language
Introduction with Programming LanguageIntroduction with Programming Language
Introduction with Programming Language
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
 
What is programming what are its benefits
What is programming  what are its benefits What is programming  what are its benefits
What is programming what are its benefits
 
Chapter 5: Accounting in ERP Systems
Chapter 5: Accounting in ERP SystemsChapter 5: Accounting in ERP Systems
Chapter 5: Accounting in ERP Systems
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
 

Similar to Chap1

Logic Formulation 1
Logic Formulation 1Logic Formulation 1
Logic Formulation 1deathful
 
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
 
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...yaminohime
 
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
 
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.pptxTeddyDaka
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxSherinRappai1
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxSherinRappai
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)Fadilah Badari
 
computer sciencecompiler Introduction Lecture notes
computer sciencecompiler Introduction Lecture notescomputer sciencecompiler Introduction Lecture notes
computer sciencecompiler Introduction Lecture notesamandemarvin
 
Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycleDhana malar
 

Similar to Chap1 (20)

Logic Formulation 1
Logic Formulation 1Logic Formulation 1
Logic Formulation 1
 
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
 
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
 
Uc13.chapter.13
Uc13.chapter.13Uc13.chapter.13
Uc13.chapter.13
 
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
 
DMA113 Chap1
DMA113 Chap1DMA113 Chap1
DMA113 Chap1
 
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
 
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
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
 
Nota (first)
Nota (first)Nota (first)
Nota (first)
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
computer sciencecompiler Introduction Lecture notes
computer sciencecompiler Introduction Lecture notescomputer sciencecompiler Introduction Lecture notes
computer sciencecompiler Introduction Lecture notes
 
Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycle
 
Uc14 chap13
Uc14 chap13Uc14 chap13
Uc14 chap13
 

Recently uploaded

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

Chap1

  • 1. A Beginner’s Guide to Programming Logic, Introductory Chapter 1 An Overview of Computers and Programming
  • 2. 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 2
  • 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 3
  • 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 4
  • 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 5
  • 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 6
  • 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 7
  • 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 8
  • 9. Understanding the Program Development Cycle (continued) Figure 1-1 The program development cycle A Beginner's Guide to Programming Logic, Introductory 9
  • 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 10
  • 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 11
  • 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 12
  • 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 13
  • 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 14
  • 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 15
  • 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 16
  • 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 17
  • 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 18
  • 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 19
  • 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 20
  • 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 21
  • 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 22
  • 23. Drawing Flowcharts (continued) Figure 1-6 Flowchart and pseudocode of program that doubles a number A Beginner's Guide to Programming Logic, Introductory 23
  • 24. 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 31
  • 25. Understanding Programming Environments (continued) Figure 1-12 A C# number-doubling program in Visual Studio A Beginner's Guide to Programming Logic, Introductory 32
  • 26. 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 33
  • 27. 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 34
  • 28. Understanding User Environments (continued) Figure 1-14 Executing a number-doubling program in a GUI environment A Beginner's Guide to Programming Logic, Introductory 35
  • 29. 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 36
  • 30. 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 37
  • 31. 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 38