Program Design & Development EE 201 C7-1 Spring 20121
Achieve Comprehension LOL of using Flowcharting in programming Demonstrate a willingness to respond to using Flowcharting in programming. Class Learning Objectives C7-1 Spring 20122
Matlab Programming Mode C7-1 Spring 20123
Algorithms and Control Structures Algorithm: an ordered sequence of precisely defined instructions that performs some task in a finite amount of time. Ordered means that the instructions can be numbered, but an algorithm must have the ability to alter the order of its instructions using a control structure. C7-1 Spring 20124
There are three categories of Algorithmic operations: Sequential operations: Instructions executed in order. Conditional operations: Control structures that first ask a question to be answered with a true/false answer and then select the next instruction based on the answer. Iterative operations (loops): Control structures that repeat the execution of a block of instructions. C7-1 Spring 20125
Steps for developing a computer solution: Table 4.1–1 1. State the problem concisely. 2. Specify the data to be used by the program. This is the “input.” 3. Specify the information to be generated by the program. This is the “output.” (continued …) C7-1 Spring 20126
Steps for developing a computer solution: Table 4.1–1 4. Work through the solution steps by hand or with a calculator; use a simpler set of data if necessary. 5. Write and run the program. 6. Check the output of the program with your hand solution. (continued …) C7-1 Spring 20127
Steps for developing a computer solution: Table 4.1–1 7. Run the program with your input data and perform a reality check on the output. 8. If you will use the program as a general tool in the future, test it by running it for a range of reasonable data values; perform a reality check on the results. C7-1 Spring 20128
Effective documentation can be accomplished with the use off: C7-1 Spring 20129
Introduction to Flowcharts C7-1 Spring
Introduction to Flowcharts C7-1 Spring
C7-1 Spring
OBJECTIVES At the end of this lesson, you will be able to understand: The meaning of flowchart. The basic parts of the flowchart such as flowchart symbols and the flow lines connecting these symbols. The advantages and limitations of flowchart C7-1 Spring
MEANING OF A FLOWCHART A flowchart is a diagrammatic representation that illustrates the sequence of operations to be performed to get the solution of a problem. C7-1 Spring
GUIDELINES FOR DRAWING A FLOWCHART Start or end of the program Computational steps or processing function of a program Input or output operation Decision making and branching Connector or joining of two parts of program Flow line C7-1 Spring
16 Draw a flowchart to compute and display the sum, average and product of three numbers EXAMPLES ON FLOWCHARTING Sequential operation C7-1 Spring 2012
EXAMPLES ON FLOWCHARTING C7-1 Spring
Flowchart 18 C7-1 Spring 2012 Display B T F Start Input A,B,C A>B Display A End Display C B>C Display C T F A>C F T
EXAMPLES ON FLOWCHARTING C7-1 Spring
C7-1 Spring Idea of Looping Flowchart
EXAMPLES ON FLOWCHARTING C7-1 Spring
C7-1 Spring Idea of Looping Flowchart