Upcoming SlideShare
Loading in …5
×

# Chap6

4,244 views

Published on

Published in: Technology, Education
0 Comments
3 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

No Downloads
Views
Total views
4,244
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
115
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

### Chap6

1. 1. PROGRAM DEVELOPMENT CYCLE
2. 2. Problem Statement: <ul><li>Problem Statement help diagnose the situation so that your focus is on the problem , h elpful tools at this stage include Algorithms and flowcharts for identifying the expected steps of a process. Therefore to solve any problem, </li></ul><ul><li>Collect and analyze information and data </li></ul><ul><li>Talk with people familiar with the problem </li></ul><ul><li>If at all possible, view the problem first hand </li></ul><ul><li>Confirm all findings </li></ul>
3. 3. An Algorithm: Baking a Cake Algorithm: A predetermined series of instructions for carrying out a task in a finite number of steps.
4. 4. An Algorithm: Baking a Cake Algorithm: A predetermined series of instructions for carrying out a task in a finite number of steps.
5. 5. Algorithm <ul><li>The Term Algorithm refers to the logic of a program. It is a step-by-step description of a solution to the given problem. </li></ul><ul><li>When sequence of instructions are executed in the specified format and sequence the desired result are obtained. </li></ul><ul><li>Definition:- A format or set of steps for solving a particular problem is called as algorithm. </li></ul><ul><li>It has clear starting and stopping point. With specific step by step instructions in each line. </li></ul>
6. 6. Characteristics of Algorithm <ul><li>Each instruction should be precise and clear. </li></ul><ul><li>Each instruction should be executed in a finite time. </li></ul><ul><li>One or more instructions should not be repeated Infinitely. </li></ul><ul><li>After executing the instructions the desired result are obtained. </li></ul><ul><li>It range from Simple to the Complex. </li></ul>
7. 7. Process of algorithm <ul><li>An algorithm must express the steps in the solution in a way that will be suitable for computer processing. </li></ul><ul><li>It Read Value perform a simple procedure and output the required result. </li></ul><ul><li>After algorithm a Flowchart is prepared and than it is run in the language form in the computer. </li></ul>
8. 8. Algorithm: <ul><li>The algorithm is part of the blueprint or plan for the computer program, an algorithm is: </li></ul><ul><li>“ An effective procedure for solving a class of problems in a finite number of steps.” </li></ul><ul><li>Every algorithm should have the following 5 characteristic feature: </li></ul><ul><ul><ul><ul><li>Input </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Output </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Definiteness </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Effectiveness </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Termination </li></ul></ul></ul></ul>
9. 9. Algorithm <ul><li>To find largest of three numbers </li></ul><ul><li>Start </li></ul><ul><li>Read 3 numbers: num1, num2, num3 </li></ul><ul><li>if num1 > num2 then go to step 5 </li></ul><ul><li>if num2 > num3 then </li></ul><ul><li>print num2 is largest </li></ul><ul><li>else </li></ul><ul><li>print num3 is largest </li></ul><ul><li>goto step 6 </li></ul><ul><li>if num1 > num3 then </li></ul><ul><li>print num1 is largest </li></ul><ul><li>else </li></ul><ul><li>print num3 is largest </li></ul><ul><li>end. </li></ul>
10. 10. Flowchart <ul><li>A Flowchart is a pictorial representation of an algorithm. </li></ul><ul><li>It is a symbolic diagram of operation sequence, dataflow, control flow and processing logic in information processing. </li></ul><ul><li>The symbol used are simple and easy to learn. </li></ul><ul><li>It is a very help full tool for programmers and beginners. </li></ul>
11. 11. Purpose of flowchart <ul><li>Provide Communication. </li></ul><ul><li>Provide an overview. </li></ul><ul><li>Show all elements and its relationship. </li></ul><ul><li>Quick method of showing program flow. </li></ul><ul><li>Check program logic. </li></ul><ul><li>Facilitate coding. </li></ul><ul><li>Provide program revision. </li></ul><ul><li>Provide Program documentation. </li></ul>
12. 12. Advantages of flowchart. <ul><li>Communication. </li></ul><ul><li>Effective analysis. </li></ul><ul><li>Proper documentation. </li></ul><ul><li>Efficient coding. </li></ul><ul><li>Proper debugging. </li></ul><ul><li>Efficient program maintenance. </li></ul><ul><li>Easy and clear presentation. </li></ul>
13. 13. Limitation of flowchart <ul><li>Complex logic. </li></ul><ul><li>Drawing is time consuming. </li></ul><ul><li>Alteration and modification. </li></ul><ul><li>Redrawn many times. </li></ul><ul><li>Difficult to draw and remember. </li></ul><ul><li>Reproduction ( replica ). </li></ul><ul><li>Technical detail. </li></ul>
14. 14. Symbols used in flowchart <ul><li>All symbols are of different shape and size. </li></ul><ul><li>All have specific meaning and use. </li></ul>
15. 15. BASIC SYMBOLS Terminal Symbol = for start and stop. INPUT and OUTPUT = Any function of input and output data. Processing = An arithmetic and data movement instruction. Shows mathematical calculation and logic operations.
16. 16. SYMBOLS Decision = Diamond indicate decision point in the program flow. IT may have 2 way branch or 3 way also. Flow Lines = A Straight line between two boxes shows the path of logic flow in the program. An arrow head on the top of the line shows the direction of the flow, data from top to bottom and left to right. Connectors = 2 small circles are used to connect separated portions of a flowchart without drawing lines between the parts. One connector indicated where the flow breaks off the other where it resumes.
17. 17. Flowchart for finding the sum of first five natural numbers ( i.e. 1,2,3,4,5):
18. 18. Flowchart (Example): Flowchart to find the sum of first 50 natural numbers.
19. 19. Start Read A, B Is A > B Print A Print B End Yes No Flow Chart to find largest of two numbers:
20. 20. Flowchart to find the largest of three numbers A,B, and C: NO
21. 21. LIMITATIONS OF USING FLOWCHARTS: <ul><li>Complex logic: Sometimes, the program logic is quite complicated. In that case, flowchart becomes complex and clumsy. </li></ul><ul><li>Alterations and Modifications: If alterations are required the flowchart may require re-drawing completely. </li></ul><ul><li>Reproduction: As the flowchart symbols cannot be typed, reproduction of flowchart becomes a problem. </li></ul>