Unit 1 - Overview
Unit 1 - Overview
Programming
Learning Outcomes
• Computer systems
• Simple program logic
• The steps involved in the program development
cycle
• Pseudocode statements and flowchart symbols
• Programming and user environments
• The evolution of programming models
Computer Systems
A computer system is a combination of all the
components required to process and store data
using a computer.
• Hardware
• Software
– Application software
– System software
Contt..
Computer hardware and software accomplish
three major operations in most programs:
• Input
• Processing
• Output
Truth/False
1. Hardware is the equipment, or the devices,
associated with a computer. Software is
computer instructions.
2. The grammar rules of a computer
programming language are its syntax.
3. You write programs using machine language,
and translation software converts the
statements to a programming language.
Simple Program Logic
input myNumber
set myAnswer = myNumber * 2
output myAnswer
Truth/False
1. A program with syntax errors can execute but
might produce incorrect results.
2. Although the syntax of programming languages
differs, the same program logic can be
expressed in different languages.
3. Most simple computer programs include steps
that perform input, processing, and output.
Program Development Cycle
1. Understand the problem.
2. Plan the logic.
3. Code the program.
4. Use software (a compiler or interpreter) to
translate the program into machine language.
5. Test the program.
6. Put the program into production.
7. Maintain the program.
Creating an executable program
Pseudocode Statements and
Flowchart Symbols
• Pseudocode is an English-like representation of the
logical steps it takes to solve a problem. Pseudo is a
prefix that means false, and to code a program means to
put it in a programming language; therefore, pseudocode
simply means false code, or sentences that appear to
have been written in a computer programming language
but do not necessarily follow all the syntax rules of any
specific language.
• A flowchart is a pictorial representation of the same
thing.
Flow Chart Symbols
Programming Environments
• A text editor is a program that you use to create
simple text files. It is similar to a word processor, but
without as many features. You can use a text editor
such as Notepad that is included with Microsoft
Windows.
• You can use the editor of an integrated development
environment (IDE) to enter your program. An IDE is
a software package that provides an editor, compiler,
and other programming tools.
User Environments
• A user might execute a program you have
written in any number of environments. For
example, a user might execute the number-
doubling program from a command line. A
command line is a location on your computer
screen at which you type text entries to
communicate with the computer’s operating
system.
True/False
1. You can type a program into an editor that is part
of an integrated development environment, but
using a plain text editor provides you with more
programming help.
2. When a program runs from the command line, a
user types text to provide input.
3. Although GUI and command-line environments
look different, the logic of input, processing, and
output apply to both program types.
Evolution of Programming Models
• Procedural programming
• Object-oriented programming
Discussion
1. Which is the better tool for learning
programming—flowcharts or pseudocode?
Cite any educational research you can find.
2. What is the image of the computer
programmer in popular culture? Is the image
different in books than in TV shows and
movies? Would you like that image for
yourself?
Assignments
1. Draw a flowchart or write pseudocode to
represent the logic of a program that allows
the user to enter a value. The program divides
the value by 2 and outputs the result.
2. Draw a flowchart or write pseudocode to
represent the logic of a program that allows
the user to enter two values. The program
outputs the product of the two values.
References
Required reading:
• Programming Logic and Design, Comprehensive,
Cengage Learning, 2018 by Joyce Farrell
Reference Materials:
• Starting Out with Programming Logic and
Design, Pearson Education, 2015 by Tony Gaddis
THANK YOU
For your time!