انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

Algorithm and flowchart

Share |
الكلية كلية طب حمورابي     القسم الكلية ذات القسم الواحد     المرحلة 1
أستاذ المادة فائزة محمود شكر المشهداني       05/12/2018 17:15:00

Algorithm and flowchart

1- Algorithm and flowchart are two types of tools to explain the process of a program. This page extends the differences between an algorithm and a flowchart, and how to create a flowchart to explain an algorithm in a visual way.
2- Algorithms and flowcharts are two different tools used for creating new programs, especially in computer programming. An algorithm is a step-by-step analysis of the process, while a flowchart explains the steps of a program in a graphical way.


Definition of Algorithm
To write a logical step-by-step method to solve the problem is called algorithm, in other words, an algorithm is a procedure for solving problems. In order to solve a mathematical or computer problem, this is the first step of the procedure. An algorithm includes calculations, reasoning and data processing. Algorithms can be presented by natural languages, pseudo code and flowcharts,

Advantages and Disadvantages of Algorithms
Advantages
1- One of these advantages is in the development of the procedure itself, which involves the identification of the processes, major decision points, and variables necessary to solve the problem.
2- Developing an algorithm allows and even forces examination of the solution process in a rational manner.
3- Identification of the processes and decision points reduces the task into a series of smaller steps of more manageable size
4- The required specification aids in the identification and reduction of subconscious biases. By using an algorithm, decision-making becomes a more rational process.
5- Solution process allows the identification of weaknesses and errors in the process.
Disadvantages
1- One disadvantage of algorithms is that they always terminate, which means there are some computational procedures—occasionally even useful ones—which are not algorithms
2- All computational procedures, whether they terminate or not, can only give computable results.


Example1: Convert Temperature from Fahrenheit (?) to Celsius (?)
Sol:
Step 1: Read temperature in Fahrenheit,
Step 2: Calculate temperature with formula C=5/9*(F-32),
Step 3: Print C,
Example2:Find the sum two numbers N and M
Sol:
Step 1: start
Step 2: input N,M
Step 3: sum=N+M
Step 4: output sum
Step 5: End

Definition of Flowchart

A flowchart is the graphical or pictorial representation of an algorithm with the help of different symbols, shapes and arrows in order to demonstrate a process or a program. With algorithms, we can easily understand a program. The main purpose of a flowchart is to analyze different processes. Several standard graphics are applied in a flowchart:


Advantages and Disadvantages of Flow Chart
Advantages
1. Communication: Flow Charts are better way of communicating the logic of a system to all concerned.
2. Effective Analysis: With the help of flow chart, problem can be analyzed in more effective way.
3. Proper Documentation: Program flow charts serve as a good program documentation, which is needed for various purposes.
4. Efficient Coding: The flow charts act as a guide or blueprint during the systems analysis and program development phase.
5. Proper Debugging: The flow chart helps in debugging process.
6. Efficient Program Maintenance: The maintenance of operating program becomes easy with the help of flow chart. It helps the programmer to put efforts more efficiently on that part.

Disadvantages
Complex logic: Sometimes, the program logic is quite complicated. In that case, flow chart becomes complex and clumsy.

1. Alterations and Modifications: If alterations are required the flow chart may require redrawing completely.
2. Reproduction: As the flow chart symbols cannot be typed, reproduction of flow chart becomes a problem.
3. The essentials of what is done can easily be lost in the technical details of how it is done.


المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
الرجوع الى لوحة التحكم