1 / 14

Chapter 2

Chapter 2. Problem Solving. Outline and Objective. Program Development Cycle Programming Tools. Program Development Cycle:. 1. Analyze : Define the problem 2. Design : Plan the solution to the problem 3. Develop the Interface : Select the objects. Program Development Cycle:.

gunderhill
Download Presentation

Chapter 2

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. Chapter 2 Problem Solving Chapter 2- Visual Basic Schneider

  2. Outline and Objective Program Development Cycle Programming Tools Chapter 2- Visual Basic Schneider

  3. Program Development Cycle: 1. Analyze: Define the problem 2. Design: Plan the solution to the problem 3. Develop the Interface: Select the objects Chapter 2- Visual Basic Schneider

  4. 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. Chapter 2- Visual Basic Schneider

  5. Programming Tools: Flowchart Pseudocode Hierarchy Chart (Structure chart) Chapter 2- Visual Basic Schneider

  6. What is a flowchart? Diagram that visually represents the steps that the program performs to arrive at a solution. A popular logic tool used for showing an algorithm in graphical form. Chapter 2- Visual Basic Schneider

  7. Continue flowchart Programmer draws flowchart before coding. Most common flowchart symbols are: Flowline:indicates flow of logic. (arrow ) Terminal:represents beginning or end of task (oval ) Input/Output: representsinput or output operations (parallelogram ) Processing:data manipulation operations (rectangle ) Decision:used for logic or comparison operation (diamond ) Chapter 2- Visual Basic Schneider

  8. Example of Flowchart: Start Initialize counter and sum to 0 Are there more data? No Yes Get next grade This is a program to insert grades and calculate the average Increment counter Add grade to sum Average=sum/counter Print the average Finish Chapter 2- Visual Basic Schneider

  9. 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. Chapter 2- Visual Basic Schneider

  10. 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. Chapter 2- Visual Basic Schneider

  11. What is Pseudocode? An algorithm design technique that uses a combination of English words and Visual Basic statements Used to create a rough sketch of the steps required to complete a task Chapter 2- Visual Basic Schneider

  12. Example of Pseudocode: Determine the average grade of a class: Initialize Counter and Sum to 0 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 Chapter 2- Visual Basic Schneider

  13. What is a Hierarchy Chart? Shows the overall program structure. Describes what each part, or module, of the program does. Also, shows how each module relates to other modules in the program. Chapter 2- Visual Basic Schneider

  14. Example of Hierarchy Chart: Class average Program Get Grade Compute Sum and Number of Grades Calculate Average Display Average Chapter 2- Visual Basic Schneider

More Related