Problem Solving - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Problem Solving

Description:

Chapter 2- Visual Basic Schneider. 2. Outline and Objective. Program Development Cycle ... Chapter 2- Visual Basic Schneider. 18. What is a Hierarchy Chart? ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 20
Provided by: fayen
Category:
Tags: basic | problem | solving

less

Transcript and Presenter's Notes

Title: Problem Solving


1
Chapter 2
  • Problem Solving

2
Outline and Objective
  • Program Development Cycle
  • Programming Tools

3
Programming Languages
  • Machine Language
  • Assembly Language
  • High level Language

4
Machine Language
  • The fundamental language of the computers
    processor, also called Low Level Language.
  • All programs are converted into machine language
    before they can be executed.
  • Consists of combination of 0s and 1s that
    represent high and low electrical voltage.

5
Assembly Language
  • A low level language that is similar to machine
    language.
  • Uses symbolic operation code to represent the
    machine operation code.

6
High Level Language
  • Computer (programming) languages that are easier
    to learn.
  • Uses English like statements.
  • Examples are C , Visual Basic, Pascal, Fortran
    and ....

7
Example
  • Machine language
  • 130004277414005934191200274027
  • Assembly language
  • LOAD BASEPAY ADD OVERPAY STORE GROSSPAY
  • High level language
  • grossPay basePay overTimePay

8
Program Development Cycle
  • 1. Analyze Define the problem (input output )
  • 2. Design Plan the solution to the problem
  • ( steps to solve the problem algorithm)
  • 3. Choose the Interface Select the objects
  • ( forms and controls needed )

9
Program Development Cycle
  • 4. Code Translate the algorithm into a
    programming language.
  • 5. Debug and Test Locate and remove any errors
    in the program.
  • 6. Complete the Documentation Organize all the
    materials that describe the program.

10
Programming Tools
  • Steps to solve any given problem ( to represent
    algorithm)
  • Flowchart
  • Pseudocode
  • Hierarchy Chart (Structure chart)

11
What is a flowchart?
  • Logic diagram to describe each step that the
    program must perform to arrive at the solution.
  • A popular logic tool used for showing an
    algorithm in graphics form.

12
Continue flowchart
  • Programmer prepares flowchart before coding.
  • Most common flowchart symbols are

13
Purpose of Flowcharting
  • An aid in developing the logic of a program.
  • Verification that all possible conditions have
    been considered in a program.
  • Provides means of communication with others about
    the program.
  • A guide in coding the program.
  • Documentation for the program.

14
Example of Flowchart
Start
Initialize Counter 0 and sum to 0
Are there more data
No
Yes
Get next grade
Increment counter
Add grade to sum
15
Desk Checking
  • The process of testing the flowchart with
    different data as input, and checking the output.
  • The test data should include nonstandard data as
    well as typical data.

16
What is a Pseudocode?
  • A program design technique that uses English
    words.
  • Has no formal syntactical rules.

17
Example of Pseudocode
  • Determine the average grade of a class
  • Do while there are more data
  • Get the next Grade
  • Add the Grade to the Sum
  • Increment the Counter
  • Loop
  • Compute average Sum / Counter
  • Display average

18
What is a Hierarchy Chart?
  • Shows the overall programs structure.
  • Describes what each part, or module, of the
    program does.
  • Also how each module relates to other modules in
    the program.

19
Example of Hierarchy Chart
Class average Program
Get Grade
Calculate Average
Compute Sum
Display Average
Write a Comment
User Comments (0)
About PowerShow.com