LESSON 2 3-Algorithims-Pseudocodes-Flowcharts
LESSON 2 3-Algorithims-Pseudocodes-Flowcharts
1. Algorithm:
In other words, the set of rules that define how a particular problem can be solved in a
finite number of steps is known as an algorithm. An algorithm is composed of a finite
set of steps, each of which may require one or more operations. Each operation must be
definite, effective and finite
Page 1 of 10
2. Structured English (Pseudo code)
The general meaning of Pseudo code is false code or fake code. Before we write a real
program, we write a program that looks like a code on the basis of algorithm and
flowchart, which may not be syntactically correct but looks like a program code is
called Pseudo code. The instruction of pseudo code is written by using English phrase
and mathematical expression. It has no hard or fast rules for writing instruction but the
instruction is closer to high-level language instructions. Therefore, the pseudo code
designers should have basic knowledge about high-level language before writing it. It is
independent of any programming language.
3. Flowchart:
Flowchart uses symbols that have geometrical shapes to indicate the different operations.
These symbols are connected by flow lines which indicate the order of execution of the
various activities. It is used by the programmers to develop programs and by system,
designers to represent the overall system while analyzing and developing the system.
Page 2 of 10
2) Once the flowchart is prepared, it is very easy to do the coding by looking at the
algorithm.
3) It is very easy to understand the logic of program by designing the flowchart.
Even people who don’t know the coding can understand the logic of a program
with the help of flowchart.
4) Systematic debugging and testing is easily possible with the help of flowchart.
5) It provides good documentation for an organization.
6) It is useful in debugging the program.
7) It provides valuable information which cannot be expressed by thousands of words.
8) It is user-friendly and can be more easily understood.
9) It expresses the clear logic of a given procedure.
10) It is unambiguous as there can be only one direction of logic at any one time.
11) It is used as working models in the design of new programs and systems.
Page 3 of 10
Symbols for flowcharts
Types of Flowchart
1) System flowchart
A flowchart that gives information about a system is called system flowchart. The
system can be data processing system, production system, reservation system, inventory
system, accounting system and evaluation system. It plays a very important role in
analysis and designing of the new system.
In system flowchart, the information flows from one section of the organizational unit
to another section or forms one processing machine to another. It is drawn by the
system designer while developing the new system. It does not focus on the process to
solve a particular problem. An information processing cycle can be illustrated below:
Page 4 of 10
In other words, a system flowchart describes the data flow and operations for a data
processing system. It shows how the data processing is to be accomplished.
2) Program flowchart:
Program flowchart describes the sequence of operations and decisions for a particular
program. In other words, we can say that a diagrammatical or pictorial sequence of
instructions used by a programmer to solve any problem is called Program Flowchart.
SUMMARY
Page 5 of 10
The learners were introduced to program design tools such as; flowcharts, Pseudocode
and algorithms. Flowcharts used standard symbols, algorithms use English statements,
while Pseudocode are written in symbols (false codes). Finally, program solving styles
and strategies were discussed.
Revision Questions
PROGRAMMING STYLES
Monolithic Approach
A program is developed as a single piece of code. This style is not suitable for
complex programs.
Demerits
Page 6 of 10
PROGRAMMING APPROACHES
They include
Top-Down Approach
In this approach the management starts by creating a general overview of the problem.
Later, the experts (I.T experts) analyze the overall problem, then break it down into
modules. Finally, the solution for each module are provided.
In this approach, a large project divides into small programs, and these programs are
known as modules.
C programming language supports this approach for developing projects. It is always
good idea that decomposing solution into modules in a hierarchal manner.
The basic task of a top-down approach is to divide the problem into tasks and then
divide tasks into smaller sub-tasks and so on.
In this approach, first we develop the main module and then the next level modules are
developed. This procedure is continued until all the modules are developed.
Page 7 of 10
Example of a Top-Down Approach (Railway Reservation System)
Bottom up Approach
This approach starts by creating the finer details that contribute to the overall picture
of the whole system. Here, at the department/sections, systems are analyzed, and the
problem is well articulated. Further, the modules are designed and developed. Finally,
the integration of the modules is done to come up with a complete system.
Page 8 of 10
Example of a Bottom-Up Approach (Railway Reservation System)
The top-down and bottom-up approaches to deploying your identity management solution are
provided to help you decide the best way to integrate identity management capabilities into your
environment. Each approach has distinct advantages and disadvantages, as shown in the Table
below.
Advantages
User and business awareness of the Your organization realizes a focused use
product. Benefits are realized in the of resources from the individual
early phases. managed application.
You can replace many manual The first implementation becomes a
processes with early automation. showcase for the identity management
You can implement password solution.
management for a large number of When the phases are completed for the
users. managed application, you have
Page 9 of 10
Pros and cons of the top-down and bottom-up implementation approaches
Bottom-up approach Top-down approach
You do not have to develop custom
adapters in the early phases. implemented a deeper, more mature
Your organization broadens identity implementation of the identity
management skills and understanding management solution.
during the first phase. Operation and maintenance resources are
Tivoli Identity Manager is introduced to not initially impacted as severely as with
your business with less intrusion to your the bottom-up approach.
operations.
Disadvantages
The organizational structure you The solution provides limited coverage
establish might have to be changed in a in the first phases.
later roll-out phase. A minimal percentage of user accounts
Because of the immediate changes to are managed in the first phases.
repository owners and the user You might have to develop custom
population, the roll-out will have a adapters at an early stage.
higher impact earlier and require greater The support and overall business will not
cooperation. realize the benefit of the solution as
This strategy is driven by the existing rapidly.
infrastructure instead of the business The implementation cost is likely to be
processes. higher.
SUMMARY
In this section, the learner was introduced to program design styles and strategies.
Monolithic and modularization styles were discussed in details. Finally, top down and
bottom up strategies were discussed giving merits, and demerits of each.
Revision Questions
Page 10 of 10