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

Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
Chinnu Edwin
 
Program design and problem solving techniques
Program design and problem solving techniquesProgram design and problem solving techniques
Program design and problem solving techniques
Dokka Srinivasu
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
praveena p
 
Logic Formulation 3
Logic Formulation 3Logic Formulation 3
Logic Formulation 3
deathful
 
Chapter 1 - An Overview of Computers and Programming Languages
Chapter 1 - An Overview of Computers and Programming LanguagesChapter 1 - An Overview of Computers and Programming Languages
Chapter 1 - An Overview of Computers and Programming Languages
Adan Hubahib
 
Introduction to problem solving in c++
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++
Online
 
Coding principles
Coding principles Coding principles
Coding principles
DevAdnani
 
Decision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, StringsDecision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, Strings
Prabu U
 
Grade 10 program development cycle
Grade 10   program development cycleGrade 10   program development cycle
Grade 10 program development cycle
Rafael Balderosa
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)
Fadilah Badari
 
Steps for Developing a 'C' program
 Steps for Developing a 'C' program Steps for Developing a 'C' program
Steps for Developing a 'C' program
Sahithi Naraparaju
 
Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
Diwakar Pratap Singh 'Deva'
 
Programming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd editionProgramming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd edition
Indian Maritime University, Visakhapatnam
 
Coding
CodingCoding
Coding
Vishal Singh
 
STRUCTURED PROGRAMMING Chap2
STRUCTURED PROGRAMMING Chap2STRUCTURED PROGRAMMING Chap2
STRUCTURED PROGRAMMING Chap2
Bro Shola Ajayi
 
Week10 final
Week10 finalWeek10 final
Week10 final
Irfan Ali Memon
 
Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycle
Dhana malar
 
C program execution and algorithm
C program execution and algorithm C program execution and algorithm
C program execution and algorithm
Kunal Pandhram
 
Algorithms
AlgorithmsAlgorithms
Principles of programming
Principles of programmingPrinciples of programming
Principles of programming
Rob Paok
 

What's hot (20)

Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
 
Program design and problem solving techniques
Program design and problem solving techniquesProgram design and problem solving techniques
Program design and problem solving techniques
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
 
Logic Formulation 3
Logic Formulation 3Logic Formulation 3
Logic Formulation 3
 
Chapter 1 - An Overview of Computers and Programming Languages
Chapter 1 - An Overview of Computers and Programming LanguagesChapter 1 - An Overview of Computers and Programming Languages
Chapter 1 - An Overview of Computers and Programming Languages
 
Introduction to problem solving in c++
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++
 
Coding principles
Coding principles Coding principles
Coding principles
 
Decision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, StringsDecision Making Statements, Arrays, Strings
Decision Making Statements, Arrays, Strings
 
Grade 10 program development cycle
Grade 10   program development cycleGrade 10   program development cycle
Grade 10 program development cycle
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)
 
Steps for Developing a 'C' program
 Steps for Developing a 'C' program Steps for Developing a 'C' program
Steps for Developing a 'C' program
 
Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
 
Programming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd editionProgramming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd edition
 
Coding
CodingCoding
Coding
 
STRUCTURED PROGRAMMING Chap2
STRUCTURED PROGRAMMING Chap2STRUCTURED PROGRAMMING Chap2
STRUCTURED PROGRAMMING Chap2
 
Week10 final
Week10 finalWeek10 final
Week10 final
 
Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycle
 
C program execution and algorithm
C program execution and algorithm C program execution and algorithm
C program execution and algorithm
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Principles of programming
Principles of programmingPrinciples of programming
Principles of programming
 

Similar to Chap1

chapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdfchapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdf
BernardVelasco1
 
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.pdf
lailoesakhan
 
Cs111 ch01 v4
Cs111 ch01 v4Cs111 ch01 v4
Cs111 ch01 v4
ArnoldNarte
 
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
 
Uc13.chapter.13
Uc13.chapter.13Uc13.chapter.13
Uc13.chapter.13
Irfan Ali Memon
 
CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.ppt
Tekle12
 
Chapter 4 computer language
Chapter 4 computer languageChapter 4 computer language
Chapter 4 computer language
Azimjon Khamdamov
 
DMA113 Chap1
DMA113 Chap1DMA113 Chap1
DMA113 Chap1
Bro Shola Ajayi
 
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
AparnaPriyadarsiniMe
 
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
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
SherinRappai1
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
SherinRappai
 
Nota (first)
Nota (first)Nota (first)
Nota (first)
Fariza Zahari
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
Dr. C.V. Suresh Babu
 
computer sciencecompiler Introduction Lecture notes
computer sciencecompiler Introduction Lecture notescomputer sciencecompiler Introduction Lecture notes
computer sciencecompiler Introduction Lecture notes
amandemarvin
 
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
 
Uc14 chap13
Uc14 chap13Uc14 chap13
Uc14 chap13
Rashid Yahye
 
Uc14 chap13
Uc14 chap13Uc14 chap13
Uc14 chap13
ayahye
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
Appili Vamsi Krishna
 

Similar to Chap1 (20)

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)
 
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
 
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
 
Uc14 chap13
Uc14 chap13Uc14 chap13
Uc14 chap13
 
Uc14 chap13
Uc14 chap13Uc14 chap13
Uc14 chap13
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 

Recently uploaded

Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 

Recently uploaded (20)

Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 

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