Flowcharting Skills - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Flowcharting Skills

Description:

'Inner' parentheses takes precedence over outer parentheses ... He knows how much he is going to deposit, the interest rate that he will receive, ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 21
Provided by: Msm4
Category:

less

Transcript and Presenter's Notes

Title: Flowcharting Skills


1
Flowcharting Skills
  • Visually Representing
  • Process Logic

2
Why Do Flowcharting?
  • Economically expresses process logic A
    picture is worth a thousand words.
  • Independent of implementation
  • Physical or logical processes
  • Supports any programming environment
  • Works well for technical and non-technical
    people.

3
Where does Flowcharting Fit in Systems
Development?
  • During Analysis to document current process
    logic.
  • During Design to communicate specified process
    logic to the implementation/construction staff.
  • During Implementation to document procedures and
    processes.

4
Consider Some Examples
5
Problem 1
  • Dave Smarsh wants to find out how much money he
    will have in his savings account after a certain
    number of years (the balance).
  • He knows
  • The amount he will deposit
  • the interest rate he will receive
  • the number of years he will be save his money
  • Assumption interest is compounding
  • Develop a flowchart to calculate and print the
    balance in a savings account.

6
Think Like A ComputerOutline the Process
  • First
  • Input the Data
  • Second
  • Perform the Algorithm
  • (Logic and Calculations)
  • Third
  • Output the Results

7
Understand the Algorithm (Logic and
Calculations)
  • After one year the balance is
  • Balance Deposit (1 Rate/100)
  • After the second year
  • New Balance Old Balance (1Rate/100)
  • New Balance Deposit (1Rate/100)2
  • After year n
  • Balance Deposit (1 Rate/100) n

8
Order (Precedence) of Math Operations
  • Programs use algebra rules
  • Avoids unnecessary characters in formulas
  • Complex formulas can be on one line

Z (2012)3/15
9
Order Operations
  • Do Everything within parentheses first.
  • Inner parentheses takes precedence over outer
    parentheses
  • The power operator () takes precedence over
    multiply () divide (/).
  • Multiply () divide (/) take precedence over
    addition () and subtraction (-).
  • Consider the formula
  • Balance Deposit (1 Rate/100) n

10
Order of Operations Visually
  • ( ) , / , -

11
Try Some Operations Precedence Problems
12
Remember the Flowcharting Process
  • First
  • Input the Data
  • Second
  • Perform the Algorithm (Calculations)
  • Third
  • Output the Results
  • How can we visualize this process?
  • Use A Flowchart!!

13
Flowchart Symbols
  • Start/End
  • Input/Output
  • Process/Computation
  • Decision
  • Connector
  • Logic Flow

14
Problem 1
  • Dave Smarsh wants find out how much money he will
    have in his savings account after a certain
    number of years (the balance). He knows how much
    he is going to deposit, the interest rate that he
    will receive, and the number of years that he
    will be saving his money. (Assume that the
    interest is compounding).
  • Develop a flowchart to calculate and print the
    balance in a savings account.

15
1 Solution
START
INPUT Deposit, Rate, No.Years
BALANCE Deposit (1 Rate/100) No.Years
PRINT Deposit, Rate, No.Years, Balance
This Program Control Structure is called
SEQUENTIAL
FINISH
16
Problem 2
  • Captain Beefnut, the proud owner of Beefnut
    Doughnut Shop, needs a program that will
    calculate and print bills for his customers.
  • His usual price for doughnuts is 60 cents each,
    but in order to increase sales he has reduced the
    price to 40 cents each if a customer buys 12 or
    more.
  • Develop this in a flowchart form.

17
2 Solution
This Program Control Structure is called
SELECTION or Decision
18
Consider an Extension
  • Suppose Captain Beefnut wanted his program to
    repeat the algorithm if there was another
    customer bill to calculate. Add a loop which
    will accomplish this change.

19
2 with loop
This Program Control Structure is called
LOOPING or ITERATION or REPETITION
20
Try Some Other Flowcharting Examples
  • (Then take a Quiz)
Write a Comment
User Comments (0)
About PowerShow.com