Program Flow Charting How to tackle the beginning stage a program design
CMPE12cGabriel Hugh Elkaim 2 A Program Set of instructions written in a programming language that tells the computer what to do
CMPE12cGabriel Hugh Elkaim 3 Programmers Prepare instructions that make up the program Run the instructions to see if they produce the correct results Make corrections Document the program Interact with –Users –Managers –Systems analysts Coordinate with other programmers to build a complete system
CMPE12cGabriel Hugh Elkaim 4 The Programming Process Defining the problem Planning the solution Coding the program Testing the program Documenting the program
CMPE12cGabriel Hugh Elkaim 5 The Programming Process: Defining the Problem What is the input What output do you expect How do you get from the input to the output
CMPE12cGabriel Hugh Elkaim 6 The Programming Process: Planning the Solution Algorithms –Detailed solutions to a given problem Sorting records, adding sums of numbers, etc.. Design tools –Flowchart –Pseudocode Has logic structure, but no command syntax
CMPE12cGabriel Hugh Elkaim 7 Desk-checking –Personal code design walk through Peer Reviews –“Code walk through”/structured walk through The Programming Process: Planning the Solution
CMPE12cGabriel Hugh Elkaim 8 The Origin of the Algorithm From “The Cartoon Guide to Computer Science,” by Larry Gonick
CMPE12cGabriel Hugh Elkaim 9
CMPE12cGabriel Hugh Elkaim 10
CMPE12cGabriel Hugh Elkaim 11
CMPE12cGabriel Hugh Elkaim 12 The Indian Numerals
CMPE12cGabriel Hugh Elkaim 13
CMPE12cGabriel Hugh Elkaim 14
CMPE12cGabriel Hugh Elkaim 15
CMPE12cGabriel Hugh Elkaim 16
CMPE12cGabriel Hugh Elkaim 17
CMPE12cGabriel Hugh Elkaim 18
CMPE12cGabriel Hugh Elkaim 19 What defines an algorithm
CMPE12cGabriel Hugh Elkaim 20
CMPE12cGabriel Hugh Elkaim 21
CMPE12cGabriel Hugh Elkaim 22
CMPE12cGabriel Hugh Elkaim 23 Flow Control Elements The Programming Process: Planning the Solution
CMPE12cGabriel Hugh Elkaim 24 Needed Elements Start/Stop Process Decision Input/Output Connector
CMPE12cGabriel Hugh Elkaim 25 The Programming Process: Planning the Solution Accept series of numbers and display the average
CMPE12cGabriel Hugh Elkaim 26
CMPE12cGabriel Hugh Elkaim 27
CMPE12cGabriel Hugh Elkaim 28
CMPE12cGabriel Hugh Elkaim 29
CMPE12cGabriel Hugh Elkaim 30 The Programming Process: Coding the Program Translate algorithm into a formal programming language Within syntax of the language How to key in the statements? –Text editor –Programming environment –Interactive Development Environment (IDE)
CMPE12cGabriel Hugh Elkaim 31 The Programming Process: Testing the Program Translation – compiler –Translates from source module into object module –Detects syntax errors Link – linkage editor (linker) –Combines object module with libraries to create load module –Finds undefined external references Debugging –Run using data that tests all statements –Logic errors
CMPE12cGabriel Hugh Elkaim 32 The Programming Process: Documenting the Program Performed throughout the development Material generated during each step –Problem definitions –Program plan –Comments within source code –Testing procedures –Narrative –Layouts of input and output –Program listing
CMPE12cGabriel Hugh Elkaim 33 1 st Generation: Machine Level 2 nd Generation: Assembly Level 3 rd Generation: High Level Procedural Level Languages
CMPE12cGabriel Hugh Elkaim 34
CMPE12cGabriel Hugh Elkaim 35
CMPE12cGabriel Hugh Elkaim 36
CMPE12cGabriel Hugh Elkaim 37
CMPE12cGabriel Hugh Elkaim 38 FORTRAN Third Generation Languages
CMPE12cGabriel Hugh Elkaim 39 COBOL Third Generation Languages
CMPE12cGabriel Hugh Elkaim 40 BASIC Third Generation Languages
CMPE12cGabriel Hugh Elkaim 41 Third Generation Languages C++
CMPE12cGabriel Hugh Elkaim 42 More Flow Charting Examples
CMPE12cGabriel Hugh Elkaim 43
CMPE12cGabriel Hugh Elkaim 44