Skip to content
GK24
GK NotesComputer AwarenessAlgorithms, Flowcharts and the Software Development Life Cycle

Algorithms, Flowcharts and SDLC: Symbols, Models and PYQs

Exam notes on algorithms, pseudocode, flowchart symbols, time complexity, the phases of the software development life cycle and its waterfall, spiral and agile models.

By · Published · 4 min read

Algorithms, Flowcharts and SDLC: Symbols, Models and PYQs — GK24 title card
Algorithms, Flowcharts and SDLC: Symbols, Models and PYQs — GK24 title card

Before a single line of code is written, a programmer settles two questions: what the sequence of steps is, and how the project as a whole will be built and handed over. The first belongs to algorithms and flowcharts, the second to the software development life cycle. Computer awareness papers for banking, SSC and state recruitment ask from both halves, usually as definitions, flowchart symbols, the order of the SDLC phases and the name of a model. This note covers all of it in the form examiners use.

What an algorithm is

An algorithm is a finite, ordered set of unambiguous instructions that takes an input and produces the required output in a limited number of steps. The word comes from the name of the ninth-century Persian mathematician Al-Khwarizmi, whose book on calculation entered Europe in Latin translation. An algorithm must satisfy five properties: it must have zero or more well-defined inputs; it must produce at least one output; every step must be definite, that is, free of ambiguity; it must be finite and terminate after a bounded number of steps; and it must be effective, meaning each step can actually be carried out. An algorithm written in plain structured English, with the keywords of programming but none of the syntax, is called pseudocode. The same logic drawn as a picture is a flowchart.

Flowchart symbols

Flowcharts use a standard set of shapes, and a question on them appears in almost every computer awareness paper.

SymbolShapeMeaning
TerminalOval or rounded rectangleStart and Stop of the flowchart
ProcessRectangleA calculation or an assignment such as sum = a + b
Input or OutputParallelogramReading a value or printing a result
DecisionDiamond or rhombusA condition with Yes and No branches
Flow lineArrowThe order in which the steps are performed
ConnectorSmall circleJoins parts of a chart broken across pages
Predefined processRectangle with double side linesA call to a subroutine or module

A flowchart is read from top to bottom and from left to right; every decision box has exactly one entry and two exits. A chart that cannot reach a Stop symbol describes an infinite loop and therefore fails the finiteness test of an algorithm.

Efficiency and complexity

Two algorithms can solve the same problem at very different cost, so efficiency is measured as time complexity, the number of basic operations, and space complexity, the extra memory required. Both are written in asymptotic or Big-O notation, which describes growth for large inputs. Linear search examines items one by one and is O(n). Binary search, which repeatedly halves a sorted list, is O(log n), which is why it is far faster but needs the data sorted first. Bubble sort, selection sort and insertion sort are O(n squared) in the worst case, while merge sort and heap sort are O(n log n). Big-O ignores constants and keeps only the dominant term.

The software development life cycle

The SDLC is the sequence of stages through which a software product passes from idea to retirement. The classical order is requirement gathering and analysis, in which the Software Requirements Specification or SRS is prepared; feasibility study; design, split into high-level design of modules and low-level design of logic; coding or implementation; testing; deployment or installation; and finally maintenance, which is usually the longest and costliest phase. Two design qualities are asked repeatedly. Coupling is the degree of interdependence between two modules and should be kept low. Cohesion is the degree to which the elements inside one module belong together and should be kept high. The rule to remember is low coupling and high cohesion.

SDLC models

The Waterfall model, also called the linear sequential model, moves strictly from one phase to the next with no overlap, and is suited only to projects whose requirements are frozen early. The prototype model builds a working mock-up so the user can react to it before the real system is built. The iterative and incremental models deliver the product in parts. The spiral model, proposed by Barry Boehm, is risk-driven: each loop of the spiral carries out planning, risk analysis, engineering and evaluation, which makes it the model of choice for large, uncertain projects. The V-model places a verification activity on one arm and the matching validation activity on the other. Agile development, set out in the Agile Manifesto of 2001, works in short iterations called sprints, with Scrum and Kanban as its common frameworks, and DevOps extends the idea into continuous integration and delivery.

Testing and reviews

Verification asks whether the product is being built right, validation whether the right product is being built. Testing moves from unit testing of a single module, through integration testing of modules together, to system testing and finally acceptance testing by the user; alpha testing happens at the developer's site and beta testing with real users outside. Black-box testing checks only inputs against expected outputs, while white-box or glass-box testing examines the internal code paths. Boundary value analysis picks test values just inside and just outside the valid range. A code walk-through is an informal review in which the team reads a finished module to find defects, as against a formal inspection with checklists and recorded findings.

Exam Point of View

Papers ask three things from this chapter. First, definitions: the properties of an algorithm, the meaning of pseudocode, coupling and cohesion, verification against validation. Second, flowchart symbols, where the diamond, the oval and the parallelogram are the favourites and the rectangle is the usual trap. Third, the SDLC: the order of the phases, which phase produces the SRS, which phase is the costliest, and the alternative name or the author of a model - linear sequential for waterfall, Barry Boehm for spiral. Complexity questions stay at the level of matching an algorithm with its Big-O value. Previous-year papers of DSSSB and the RRB technical cadres also ask testing terms such as black-box, alpha and beta testing, boundary value analysis and the difference between a walk-through and an inspection.

Important Facts

Origin of the word algorithmAl-Khwarizmi, ninth-century Persian mathematician
Properties of an algorithmInput, output, definiteness, finiteness, effectiveness
Start and Stop symbolOval or rounded rectangle (terminal)
Process symbolRectangle
Input or output symbolParallelogram
Decision symbolDiamond or rhombus, with Yes and No exits
Binary searchO(log n), works only on sorted data
Merge sort and heap sortO(n log n)
First SDLC phaseRequirement gathering and analysis, which produces the SRS
Longest and costliest SDLC phaseMaintenance
Coupling and cohesionKeep coupling low between modules, cohesion high within a module
Waterfall modelAlso called the linear sequential model
Spiral modelProposed by Barry Boehm; risk-driven loops
Agile Manifesto2001; iterations called sprints; Scrum and Kanban frameworks
Code walk-throughInformal review after coding; an inspection is formal

Practice MCQs on this topic

Q2.Computer AwarenessEasy

In a flowchart, the oval or rounded shape is used to show:

  1. A.Start and Stop
  2. B.A subroutine call
  3. C.A decision
  4. D.The direction of flow
Show answer
Correct answer: A. Start and Stop

The oval is the terminal symbol, and a well-formed flowchart has exactly one Start terminal and at least one Stop terminal; a chart that can never reach a Stop describes an infinite loop and so breaks the finiteness property of an algorithm.

Q3.Computer AwarenessEasy

The word algorithm is derived from the name of which mathematician?

  1. A.Euclid
  2. B.Al-Khwarizmi
  3. C.Charles Babbage
  4. D.Blaise Pascal
Show answer
Correct answer: B. Al-Khwarizmi

Muhammad ibn Musa al-Khwarizmi was a ninth-century Persian mathematician and astronomer whose treatise on calculation with Hindu-Arabic numerals reached Europe in Latin translation; his Latinised name produced the word algorithm, and another of his works gave the word algebra.

Q5.Computer AwarenessAsked in: Delhi · 7 Aug 2021, Shift 1Medium

What is the other name of Linear Sequential model in software engineering?

  1. A.Spiral model
  2. B.Prototype model
  3. C.Waterfall model
  4. D.RAD model
Show answer
Correct answer: C. Waterfall model

The Waterfall model is called the linear sequential model because the project flows in one direction through requirement analysis, design, coding, testing, deployment and maintenance, with each phase completed and signed off before the next begins and no overlap between them.

Q6.Computer AwarenessEasy

Which phase of the software development life cycle produces the Software Requirements Specification (SRS)?

  1. A.Requirement gathering and analysis
  2. B.Design
  3. C.Coding
  4. D.Maintenance
Show answer
Correct answer: A. Requirement gathering and analysis

This is the first phase of the SDLC: the team meets the users, records what the system must do and what constraints apply, and sets it all down in the Software Requirements Specification, which then becomes the agreed basis for everything that follows and the yardstick for acceptance testing.

Q7.Computer AwarenessAsked in: Delhi · 7 Aug 2021, Shift 2Medium

What is COUPLING in software design?

  1. A.Coupling is a measure of the degree of functional interdependence between two modules
  2. B.Coupling is a measure of the degree of functional non-dependence between two modules
  3. C.Coupling is a measure of the functional robustness of a software module
  4. D.Coupling is a measure of the degree of functionally connected dependence between two modules
Show answer
Correct answer: A. Coupling is a measure of the degree of functional interdependence between two modules

If one module must know the internal data or logic of another to work, the two are tightly coupled, and a change in one forces a change in the other.

Q9.Computer AwarenessAsked in: Delhi · 7 Aug 2021, Shift 2Medium

Which of the following statements is/are correct regarding code walk-through in software development? I. It is an informal technique for analyzing code. II. It is performed just before coding the module.

  1. A.Neither I nor II
  2. B.Only I
  3. C.Both I and II
  4. D.Only II
Show answer
Correct answer: B. Only I

A code walk-through is an informal review technique: a few team members read a module line by line, mentally execute it on sample data and note the defects they find, without the checklists, metrics and formal records of an inspection.

Q10.Computer AwarenessMedium

Testing a program only by giving inputs and checking the outputs, without looking at the internal code, is called:

  1. A.White-box testing
  2. B.Black-box testing
  3. C.Unit testing
  4. D.Regression testing
Show answer
Correct answer: B. Black-box testing

In black-box testing the tester treats the program as a sealed box, supplies inputs drawn from the specification and compares the outputs with what the specification promises; equivalence partitioning and boundary value analysis are its standard techniques, and no knowledge of the source code is needed.

Frequently Asked Questions

What is the difference between an algorithm and a flowchart?

An algorithm is the solution written as a finite sequence of unambiguous steps, usually in pseudocode. A flowchart is the same solution drawn as a diagram with standard symbols joined by arrows. The algorithm is the text, the flowchart is the picture, and both must satisfy finiteness by reaching an end.

Which flowchart symbols are most often asked in exams?

The oval for Start and Stop, the rectangle for a process such as a calculation, the parallelogram for input or output, and the diamond for a decision with Yes and No branches. The arrow is the flow line and the small circle is the connector used when a chart spills over to another page.

What is the correct order of the phases of the SDLC?

Requirement gathering and analysis, feasibility study, design, coding or implementation, testing, deployment, and maintenance. The Software Requirements Specification is written in the first phase, and maintenance after delivery is normally the longest and most expensive phase.

Why is the Waterfall model called the linear sequential model?

Because the work flows in one direction only. Each phase is finished and approved before the next begins, with no overlap and no easy way back, like water falling from one step to the next. It therefore suits only projects whose requirements are fixed at the start.

What is the difference between coupling and cohesion?

Coupling measures how much two modules depend on each other, and good design keeps it low so that a change in one does not ripple into the other. Cohesion measures how closely the parts inside a single module belong together, and good design keeps it high. The rule is low coupling, high cohesion.

How does black-box testing differ from white-box testing?

Black-box testing uses only the specification: the tester supplies inputs and checks outputs without reading the code, using techniques such as boundary value analysis. White-box testing reads the source code and designs cases to cover its statements, branches and paths.

Sources

View all