1 / 27

Flowchart Programming Tools: Symbols, Rules, Advantages, and Limitations

Learn about flowchart programming tools, including symbols, rules, advantages, and limitations. Understand how flowcharts help in converting algorithms into computer programs.

hilaria
Download Presentation

Flowchart Programming Tools: Symbols, Rules, Advantages, and Limitations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 4 Flowchart

  2. Programming Tools • Three tools are used to convert algorithms into computer programs: • Flowchart- Graphically depicts the logical steps to carry out a task and shows how the steps relate to each other. • Pseudocode- Uses English-like phrases with some Visual Basic terms to outline the program.

  3. Outline • Flowcharting Symbols • General Rules for flowcharting • Advantages of Flowcharts • Limitations of Flowcharts • Flowcharting Tips

  4. Flowcharts • Flowchart is the graphic representations of the individual steps or actions to implement a particular module. • The flowchart can be likened to the blueprint of a building. An architect draws a blueprint before beginning construction on a building, so the programmer draws a flowchart before writing a program. • Flowchart is independent of any programming language.

  5. Flowcharts • Flowchart is the logical design of a program. • It is the basis from which the actual program code is developed. • Flowchart serves as documentation for computer program. • Graphically depict the logical steps to carry out a task and show how the steps relate to each other. • The flowchart must be drawn according to definite rules and utilizes standard symbols adopted internationally. CS202

  6. Flowcharts are usually drawn using standard symbols: CS202

  7. Counter A B S CS202

  8. START END Display message “How many hours did you work?” Display message “How much do you get paid per hour?” Read Hours Read PayRate Multiply Hours by PayRate. Store result in GrossPay. Display GrossPay What is a Flowchart? • A flowchart is a diagram that depicts the “flow” of a program. • The figure shown here is a flowchart for the pay-calculating program

  9. START END Display message “How many hours did you work?” Display message “How much do you get paid per hour?” Read Hours Read PayRate START END Display GrossPay Terminal • Terminals • represented by rounded rectangles • indicate a starting or ending point Multiply Hours by PayRate. Store result in GrossPay. Terminal

  10. START END Display message “How many hours did you work?” Display message “How much do you get paid per hour?” Read Hours Read PayRate Display message “How many hours did you work?” Read Hours Display GrossPay • Input/Output Operations • represented by parallelograms • indicate an input or output operation Input/Output Operation Multiply Hours by PayRate. Store result in GrossPay.

  11. START END Display message “How many hours did you work?” Display message “How much do you get paid per hour?” Read Hours Read PayRate Display GrossPay • Processes • represented by rectangles • indicates a process such as a mathematical computation or variable assignment Multiply Hours by PayRate. Store result in GrossPay. Process Multiply Hours by PayRate. Store result in GrossPay.

  12. Flowchart example (1)

  13. Flowchart example (2) • Example : Sale Problem • Draw a flowchart for a problem that to read two numbers. The first number represents the unit price of a product and the second number represents the quantity of the product sold. Calculate and print the total sale. • Solution: Stepwise Analysis of the Sale Problem • Start of processing • Read the unit price • Read the quantity • Calculate total sale • Print total sale • Stop the processing CS202

  14. READ QUANTITY START STOP READ PRICE PRINT SALE SALE = PRICE ´ QUANTITY CS202

  15. START A READ UNIT PRICE TOTAL SALE = UNIT PRICE ´ QUANTITY READ QUANTITY PRINT TOTAL SALE STOP A CS202

  16. Flowchart example (3) Program: Determine the direction of a numbered NYC street Eastbound or Westbound

  17. Flowchart example (4) Problem: Calculate and report the grade-point average for a class

  18. Communication: Flowcharts are better way of communicating the logic of a system to all concerned. Effective analysis: With the help of flowchart, problem can be analysed in more effective way. Proper documentation: Program flowcharts serve as a good program documentation, which is needed for various purposes. Flowchart Advantages

  19. Efficient Coding: The flowcharts act as a guide or blueprint during the systems analysis and program development phase. Proper Debugging: The flowchart helps in debugging process. Efficient Program Maintenance: The maintenance of operating program becomes easy with the help of flowchart. Flowchart Advantages

  20. LIMITATIONS OF USING FLOWCHARTS • Complex logic: Sometimes, the program logic is quite complicated. In that case, flowchart becomes complex and clumsy. • Alterations and Modifications: If alterations are required the flowchart may require re-drawing completely. • Reproduction: As the flowchart symbols cannot be typed, reproduction of flowchart becomes a problem. • The essentials of what is done can easily be lost in the technical details of how it is done.

  21. Tips and tricks of flowcharts • Flowcharts are time-consuming to write and difficult to update • For this reason, professional programmers are more likely to favor pseudocode and hierarchy charts • Because flowcharts so clearly illustrate the logical flow of programming techniques, they are a valuable tool in the education of programmers

  22. Tips and tricks of flowcharts • In drawing a proper flowchart, all necessary requirements should be listed out in logical order. • The flowchart should be clear, neat and easy to follow. • There should not be any room for ambiguity in understanding the flowchart. • The usual direction of the flow of a procedure or system is from left to right or top to bottom. • Only one flow line should come out from a process symbol

  23. Flowcharting software • Flow-charts can be created by hand or manually in most office software, but lately specialized diagram drawing software has emerged that can also be used for the purpose

  24. URL’s for free Flowcharting software • www.smartdraw.com • www.gliffy.com/uses/flowchart-software/ • www.breezetree.com/flowcharting-software/ Flowchart Software, FREE Flowchart Examples and Templates ... • www.edrawsoft.com/flowchart.php

  25. Flowchart example (5) Obtain a series of positive numbers from the keyboard, and determine and display their sum. Assume that the user types the sentinel value -1 to indicate "end of data entry"

  26. Tutorial • What do each of the following symbols represent? (Answer on next slide)

  27. Tutorial • What do each of the following symbols represent? Decision Terminal Input/Output Operation Connector Module Process

More Related