Programming and Problem Solving - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Programming and Problem Solving

Description:

The process of planning a sequence of steps for a computer ... Depress the gas pedal. Turn the key to the start position. If the engine starts, release the key ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 21
Provided by: jhy9
Category:

less

Transcript and Presenter's Notes

Title: Programming and Problem Solving


1
Programming and Problem Solving
  • Jianhua Yang
  • Department of Computer Science
  • University of Houston

2
Goals
  • What is a computer program?
  • How to write a program?
  • What is an algorithm?
  • What is a high-level programming language?
  • What is a compiler?
  • What is a computer?
  • Hardware and software
  • Problem-solving method

3
1.1 Overview of Programming
  • 1. The concept of programming
  • Programming
  • Computer
  • Computer programming
  • Computer program

Planning or scheduling the performance of a task
or an event
A programmable device that can store, retrieve,
and process data
The process of planning a sequence of steps for a
computer to follow
A sequence of instructions to be performed by a
computer
4
1.1 Overview of Programming
  • 2. How to write a program?
  • Problem-solving phase
  • Implementation phase
  • Maintenance phase
  • Analysis
  • Algorithm
  • Verification
  • Programming
  • Debugging
  • Using
  • Maintaining

5
1.1 Overview of Programming
  • Algorithm
  • A step-by-step procedure for solving a problem in
    a finite amount of time.
  • Insert the key
  • Make sure the transmission in Park
  • Depress the gas pedal
  • Turn the key to the start position
  • If the engine starts, release the key
  • if it does not, repeat to start
  • Or call the mechanic

6
1.1 Overview of Programming
  • Programs life cycle
  • Problem-solving
  • Implementation
  • Maintenance

7
1.1 Overview of Programming
  • Programming language
  • Documentation
  • Information
  • Data

A set of rules, symbols, and special words used
to construct a computer program
The written text and comments that make a program
easier for others to understand, use and modify
Any knowledge that can be communicated
Computerized information
8
1.1 Overview of Programming
Algorithm
Problem
Program
9
1.2 Programming Language
  • 1. Programming language

is a language can be used to write a program
which is recognized by a computer
Including machine language, and high-level
language
10
1.2 Programming Language
  • Compiler
  • Source program
  • Object program
  • Compilation
  • Execution

11
1.2 Programming Language
  • 2. the structure of PL
  • Sequence
  • Selection
  • loop

12
1.2 Programming Language
  • Sequence

Statement
Statement
Statement
13
1.2 Programming Language
  • Selection

Statement
Condition
Statement
14
1.2 Programming Language
  • Loop

Condition
15
1.2 Programming Language
  • 3. Subprogram

is a program can be executed independently
Statement1 Statement2 Call subprogram Loop Selecti
on Statement3
16
1.2 Programming Language
  • Example
  • Compute the sum of 1!2!3!n!

sum0 s1compute(1!) sumsums1 s2compute(2!)
sumsums2 . sumsumsn
sum0 k1 loop (k ! n1) sumsumcp(k)
kk1
17
1.3 What is a computer
  • Computer
  • Software
  • Hardware

System software Developing software
Application software
Central Processing Unit (CPU) Memory Unit
Input/Output Unit Auxiliary Storage Device
18
1.3 What is a computer
  • Structure of a computer

Input device
Output device
Central Processing Unit
Control Unit
Computing Unit
Auxiliary Storage device
Memory Unit
19
1.4 Ethics and Responsibilities in the Computing
Profession
  • Software piracy
  • Privacy of data
  • Use of computer resources
  • Software engineering

The unauthorized copying of software
20
1.5 Problem-Solving Techniques
  • Self study for this part
Write a Comment
User Comments (0)
About PowerShow.com