p2 Notes 1
p2 Notes 1
Structured English
Pseudocode
Flowchart
Decomposition/ Modularization: Process of breaking down a complex system into smaller parts that are
more manageable and easier to understand.
Benefits of Modularization/Decomposition:
Function: It is a subroutine which must return a single value to the calling program
Procedure: It is a subroutine which usually does not return any value to the calling program.
Library Routine: A tested and ready-to-use subroutine available in a programming language that can be
incorporate into a program.
User define Routine: A subroutine written by the user to perform a specific task required by a program.
It cannot be edited
Decreases the speed of execution slightly
Scope of a variable:
Local Variable: The variables which are declared in a subroutine and works within the
subroutine.
Global Variable: The variable which are declared at the beginning of the program and
works in all of the subroutines in that program.
Structure chart: a chart which shows the breakdown of a system to its lowest manageable
levels.
Features that are shown on a structure chart:
Hierarchy of modules
Parameters that are passed through each module
Sequence of module execution.
Selections.
Iterations.
Transferrable Skill: any existing skill that can be used to handle a new situation. Programming is
a transferrable skill, as skill of a programming language can be used to recognize common
features of an unknown programming language. It can be able to recognize variable
declarations, data types, assignments, sequence, selection, iteration, modules, etc.
Data Structure: A particular way of organizing data in a computer so that it can be used
effectively. Followings are examples of data structures-
Variable
Constant
Array
Stack
Queue
Linked List
Binary Tree
Graph
Hash Table
Features of IDE:
For presentation:
Pretty printing: different color coding of keywords
Auto indentation
Expansion and collapse block: Displays choice of keywords and available identifiers
appropriate at current insertion point and provides choices in alphabetical order
Observation
Questioner
Designing algorithm
• Waterfall Model
• Iterative Model
Waterfall Model: A linear sequential program development cycle, in which each stage is
completed before the next is begun.
Benefits:
Easier to manage, understand and use.
Stages do not overlap and are completed one at a time.
Each stage has specific outcomes.
Works well for smaller programs where requirements are known and
understood.
Drawbacks:
Benefits:
Some working programs developed quickly at an early stage in the life cycle.
Easier to test and debug smaller programs
More flexible as easier to alter requirements.
Customer involved in each iteration then no surprises when final system delivered
Drawbacks:
Whole program needs to be defined at start, so it can be broken down into modules to
be developed at each iteration.
Not suitable for short simple projects
More resources might be required.
Needs good planning for every stage.
Rapid Application Development (RAD): a prototyping model, with no (or less) specific planning
put into it. More emphasis on development and producing a product-prototype. A prototype is
a working model of part of the solution. High customer involvement, as customer can use the
prototypes during development.
Benefits:
Drawbacks:
Syntax Error- When source code does not obey rules of the language.
Logical Error- Program works but gives incorrect output due to incorrect
logical/arithmetical statements.
Run-time Error- An error found in a program when it is executed.
Examples: Division by 0, Out of array index/subscript, Trying to open a file which is not
exist, etc.
Methods of testing:
White-box testing: In this test, all the possible paths of a program are tested.
Black-box testing: In this test, the expected outcomes is checked against inputs.
Alpha-testing: The testing which is carried out by technical persons who were not involved in
the program development. It is usually done in development stage.
Beta-testing: The testing of a completed program by a small group of users before it is released.
Stub testing: Testing the main program without completing the codes of the subroutines. There
a dummy messages/returning values are given as body of the subroutines to indicate that the
subroutine is used.
Integration Testing: Taking modules that have been tested on individually and testing on them
combined together.
Acceptance: A test carried out by the intended users of the system, the people who requested
the software. It is used to prove to the customer that the software works exactly as required.
Manual debugging tools:
Dry run/Tracing: A process where code is manually traced, without any software used.
Walkthrough: A formal version of a dry run, done by team members etc.
Types of Maintenance:
Corrective: To correct any errors in a program that appears
during use
Adaptive: The alteration of a program to append some new
requirements.
Perfective: Process of making improvements to make a
program more efficient.