Presentation is loading. Please wait.

Presentation is loading. Please wait.

PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.

Similar presentations


Presentation on theme: "PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this."β€” Presentation transcript:

1 PROGRAM DEVELOPMENT CYCLE

2 Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this stage include Algorithms and flowcharts for identifying the expected steps of a process. Therefore to solve any problem, Collect and analyze information and data Talk with people familiar with the problem If at all possible, view the problem first hand Confirm all findings

3 An Algorithm: Baking a Cake Algorithm: A predetermined series of instructions for carrying out a task in a finite number of steps.

4 An Algorithm: Baking a Cake Algorithm: A predetermined series of instructions for carrying out a task in a finite number of steps.

5 Algorithm The Term Algorithm refers to the logic of a program. It is a step-by-step description of a solution to the given problem. When sequence of instructions are executed in the specified format and sequence the desired result are obtained. Definition:- A format or set of steps for solving a particular problem is called as algorithm. It has clear starting and stopping point. With specific step by step instructions in each line.

6 Characteristics of Algorithm Each instruction should be precise and clear. Each instruction should be executed in a finite time. One or more instructions should not be repeated Infinitely. After executing the instructions the desired result are obtained. It range from Simple to the Complex.

7 Process of algorithm An algorithm must express the steps in the solution in a way that will be suitable for computer processing. It Read Value perform a simple procedure and output the required result. After algorithm a Flowchart is prepared and than it is run in the language form in the computer.

8 Algorithm: The algorithm is part of the blueprint or plan for the computer program, an algorithm is: β€œAn effective procedure for solving a class of problems in a finite number of steps.” Every algorithm should have the following 5 characteristic feature: 1. Input 2. Output 3. Definiteness 4. Effectiveness 5. Termination

9 Algorithm To find largest of three numbers 1) Start 2) Read 3 numbers: num1, num2, num3 3) if num1 > num2 then go to step 5 4) if num2 > num3 then print num2 is largest else print num3 is largest goto step 6 5) if num1 > num3 then print num1 is largest else print num3 is largest 6) end.

10 Flowchart A Flowchart is a pictorial representation of an algorithm. It is a symbolic diagram of operation sequence, dataflow, control flow and processing logic in information processing. The symbol used are simple and easy to learn. It is a very help full tool for programmers and beginners.

11 Purpose of flowchart Provide Communication. Provide an overview. Show all elements and its relationship. Quick method of showing program flow. Check program logic. Facilitate coding. Provide program revision. Provide Program documentation.

12 Advantages of flowchart. Communication. Effective analysis. Proper documentation. Efficient coding. Proper debugging. Efficient program maintenance. Easy and clear presentation.

13 Limitation of flowchart Complex logic. Drawing is time consuming. Alteration and modification. Redrawn many times. Difficult to draw and remember. Reproduction ( replica ). Technical detail.

14 Symbols used in flowchart All symbols are of different shape and size. All have specific meaning and use.

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 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 Flowchart for finding the sum of first five natural numbers ( i.e. 1,2,3,4,5):

18 Flowchart (Example): Flowchart to find the sum of first 50 natural numbers.

19 Start Read A, B Is A > B Print A Print B End Yes No Flow Chart to find largest of two numbers:

20 Flowchart to find the largest of three numbers A,B, and C: NO

21 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.


Download ppt "PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this."

Similar presentations


Ads by Google