Professional Documents
Culture Documents
AND DESIGN
SIXTH EDITION
Chapter 1
An Overview of Computers and
Programming
OBJECTIVES
In this chapter, you will learn about:
Computer systems
2
UNDERSTANDING COMPUTER SYSTEMS
Computer system
Combination of all the components required to process and
3
UNDERSTANDING COMPUTER SYSTEMS
(CONTINUED)
Programming
Writing software instructions
4
UNDERSTANDING COMPUTER SYSTEMS
(CONTINUED)
Programming language
Useto write computer instructions
5
UNDERSTANDING COMPUTER SYSTEMS
(CONTINUED)
Permanent storage devices
Nonvolatile
6
UNDERSTANDING SIMPLE PROGRAM
LOGIC
Program with syntax errors cannot execute
Logical errors
7
UNDERSTANDING THE PROGRAM
DEVELOPMENT CYCLE
Program development cycle
Understand the problem
8
UNDERSTANDING THE PROGRAM
DEVELOPMENT CYCLE (CONTINUED)
10
PLANNING THE LOGIC
Heart of the programming process
Most common planning tools
Desk-checking
Walking through a program’s logic on paper before you
actually write the program
11
CODING THE PROGRAM
Hundreds of programming languages are available
Choose based on features
12
USING SOFTWARE TO TRANSLATE THE
PROGRAM INTO MACHINE LANGUAGE
Translator program
Compiler or interpreter
13
USING SOFTWARE TO TRANSLATE THE
PROGRAM INTO MACHINE LANGUAGE
(CONTINUED)
14
TESTING THE PROGRAM
Logical error
Use a syntactically correct statement but use the wrong one
15
PUTTING THE PROGRAM INTO
PRODUCTION
Process depends on program’s purpose
May take several months
16
MAINTAINING THE PROGRAM
Maintenance
Making changes after program is put into production
17
USING PSEUDOCODE STATEMENTS
AND FLOWCHART SYMBOLS
Pseudocode
English-like representation of the logical steps it takes to
18
WRITING PSEUDOCODE
Pseudocode representation of a number-doubling
problem
19
WRITING PSEUDOCODE (CONTINUED)
Programmers preface their pseudocode with a beginning
statement like start and end it with a terminating
20
DRAWING FLOWCHARTS
Create a flowchart
Draw geometric shapes that contain the individual statements
Input symbol
Indicates input operation
Parallelogram
Processing symbol
Processing statements such as arithmetic
Rectangle
21
DRAWING FLOWCHARTS (CONTINUED)
Output symbol
Represents output statements
Flowlines
Arrows that connect steps
Terminal symbols
Start/stopsymbols
Shaped like a racetrack
Also called lozenge
22
DRAWING FLOWCHARTS (CONTINUED)
23
REPEATING INSTRUCTIONS
After the flowchart or pseudocode has been developed, the
programmer only needs to:
Buy a computer
24
REPEATING INSTRUCTIONS
(CONTINUED)
Loop
Repetition of a series of steps
25
REPEATING INSTRUCTIONS
(CONTINUED)
26
USING A SENTINEL VALUE TO END
A PROGRAM
Making a decision
Testinga value
27
USING A SENTINEL VALUE TO END
A PROGRAM (CONTINUED)
28
USING A SENTINEL VALUE TO END
A PROGRAM (CONTINUED)
29
UNDERSTANDING PROGRAMMING
AND USER ENVIRONMENTS
Many options for programming and user environments
31
UNDERSTANDING PROGRAMMING
ENVIRONMENTS (CONTINUED)
33
UNDERSTANDING USER
ENVIRONMENTS (CONTINUED)
34
UNDERSTANDING USER
ENVIRONMENTS (CONTINUED)
35
UNDERSTANDING THE EVOLUTION
OF PROGRAMMING MODELS
People have been writing modern computer programs
since the 1940s
36
UNDERSTANDING THE EVOLUTION
OF PROGRAMMING MODELS
(CONTINUED)
Major models or paradigms used by programmers
Procedural programming
37
SUMMARY
Computer programming
Requiresspecific syntax
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
38