1.4 FLOWCHART

 The flowchart is a diagram which visually presents the flow of data through processing systems. This means by seeing a flow chart one can know the operations performed and the sequence of these operations in a system. Algorithms are nothing but sequence of steps for solving problems. So a flow chart can be used for representing an algorithm. A flowchart, will describe the operations (and in what sequence) are required to solve a given problem.

You can see a flow chart as a blueprint of a design you have made for solving a problem. For example suppose you are going for a picnic with your friends then you plan for the activities you will do there. If you have a plan of activities then you know clearly when you will do what activity. Similarly when you have a problem to solve using computer or in other word you need to write a computer program for a problem then it will be good to draw a flowchart prior to writing a computer program. Flowchart is drawn according to defined rules.

1.4.1 Flowchart Symbols

For drawing flow chart standard symbols are used. These symbols are given in Table 1.



1.4.2 Meaning of Flowchart

A flowchart is a diagrammatic representation of algorithm. It clearly illustrates the sequence of operations to be performed for getting the solution of a problem. For simple problems flow charts may not be very useful but for complex and large problems flow chars are very helpful in understanding the logic of the problem. Flowcharts are used as a link of communication between programmers and clients for whom the program to be developed. If you are having a flowchart for your program then you can use it in explaining the program to others. Once the flowchart is drawn, it becomes easy to write the computer program. Flowcharts can be used for preparing a better documentation of a complex problem.

1.4.3 Guidelines for drawing A Flowchart

Flow charts are drawn using slandered flowchart symbols. While drawing flowchart some guideline to be followed. Below are some guidelines for drawing flowchart:

1) First of all list all necessary requirements in a logical order.

2) The flowchart should be clear and easy to understand. There should not be any ambiguity in understanding the flowchart. For doing this it is necessary to have all the steps and operation very simple.

3) Usually direction of the flow of data /procedure in the system should be from left to right or top to bottom.

4) Only one flow line should come out from a process symbol.


5) In the case of use of decision symbol,only one flow line should enter to it(decision symbol), but there may be two or three flow lines coming out of the decision symbol, one for each possible answer.

6) In a flowchart only one flow line should come to the end symbol.

 


 7) While writing steps in side the processing symbol, steps should be brief and if necessary, you can use the annotation symbol to describe data or processing l steps more clearly.

 

8) In the case of complex flowchart connector symbols to be used for reducing the number of flow lines in the flowchart.

9) Intersection of flow lines should be avoided to make a flowchart more effective and for better way of communication.

10) A flowchart must have a logical start and end.

11) Once a flowchart is drawn its validity should be tested by passing through it with a simple set of test data.

1.4.4 Some examples of Flowcharts

Now, we will discuss some examples on flowcharting. These examples will help in proper understanding of flowcharting technique. This will help you in program development process in next unit of this block.

For example following is a Flowchart for finding factorial of a number N:




Problem 2: Ravi has to attend at least 70% of Practical Classes for C Programming to be eligible to appear in the examination. There are total 50 Practical Classes for C Programming. He has already attended 20 out of 30 classes held so far. Find at least how many classes to be attended by Ravi to be eligible for appearing in Practical Examination.
* Total number of classes C
* Percentage Required P
* Number of Classes Already Attended Ca
* Number of Classes to be Attendended Ct
* More classes to be attended Cm

Problem 4: Ramesh goes to market for buying some fruits and vegetables. He is having a currency of Rs 500 with him for marketing. From a shop he purchase 2.0 kg Apple priced Rs. 50.0 per kg, 1.5 kg Mango priced Rs. 35.0 per kg, 2.5 kg Potato priced Rs. 10.0 per kg, and 1.0 kg Tomato priced Rs. 15 per kg. He give the currency of Rs. 500 to the shopkeeper. Find the amount shopkeeper will return to Ramesh and also tell the total item purchased. Before we make flowchart for solving above problem let us find out what are the inputs and what is the expected output.
* Apple Price AP * Apple Amount AW
* Mango Price MP * Mango Amount MW
* Potato Price PP * Potato Amount PW
* Tomato Price TP * Tomato Amount TW
* Amount Given AM* Return Amount RAM



1.4.5 Advantages of using Flowcharts

As we discussed flow chart is used for representing algorithm in pictorial form. This pictorial representation of a solution/system is having many advantagrs.These advantages are as follows: 

1) Communication: A Flowchart can be used as a better way of communication of the logic of a system and steps involve in the solution, to all concerned particularly to the client of system. 

2) Effective analysis: A flowchart of a problem can be used for effective analysis of the problem.

3) Documentation of Program/System: Program flowcharts are a vital part of a good program documentation. Program document is used for various purposes like knowing the components in the program, complexity of the program etc. 

4) Efficient Program Maintenance: Once a program is developed and becomes operational it needs time to time maintenance. With help of flowchart maintenance become easier.

5) Coding of the Program: Any design of solution of a problem is finally converted into computer program. Writing code referring the flowchart of the solution become easy.

1.4.6 Limitations of using Flowcharts

1) Complexity of Logic: If program logic is complex then flowchart of the program becomes complicated.

2) Alterations and Modifications in Logic: any alterations in the program logic may require redrawing
of flowchart completely.

3) Reuse is Not Possible: As the flowchart symbols cannot be typed, always reproduction of flowchart symbols are required.

Comments

Popular posts from this blog

3.8 SECURE NETWORK DEVICES

3.5 SECURITY ISSUES FOR SMALL AND MEDIUM SIZED BUSINESSES

3.6 TOOLS FOR NETWORK SECURITY