Computer Programming
Fundamental
Program development life cycle
Control structures
Programming Paradigms
Algorithm
Pseudo code
Flowchart Flowchart symbols
Characteristics of a good program
Program Development Life Cycle
Program Analysis:
Understand the problem
Have multiple solution
Select a solution
Program Design:
Write algorithm
Write flowchart
Write pseudo code
Program Development:
Choose a programming language
Write a program by converting the pseudo code and then using the
programming language
Compile the program
Execute the program
Program Documentation and Maintenance:
Document the program
Maintain the program for updating removing errors changing requirements
Control structures
Control structures specify the statements specify the
statements that are to be executed and the order of the
statements that have to be executed.
Flowchart and Pseudo code use control structures for
representation. There are three kinds of control structure;
Sequential instructions are executed linear order.
Selection _it asks a true/false question and then select the
next instruction based the answer.
Iterative _it repeats the execution of a block of instructions
Programming Paradigms
Structure Programming:
Involved building of programs using small modules .
Structure programming can be performed in two ways :
1.Procedural programming
2.Modular programming
Object Oriented Programming:
OOP focuses on developing the software based on their component
objects
In OOP the software is broken into their components not based on their
functionality but based on the component or part of the software.
Aspect Oriented Programming:
AOP is new programming paradigm that handles the crosscutting
concerns of the software.
The crosscutting concerns are the global concerns like logging,
authentication, security, performance etc.
Algorithm
An algorithm is a series of specific and finite instructions that
produce a result (output), Algorithms are everywhere. For example,
in a recipe, directions of a GPS, how to tie a tie, etc.
Flowcharts and pseudo code are very useful tools to organize and
design algorithms. However, in order to develop a useful algorithm,
it is necessary to:
Understand the problem
Define an input
Process the input data
Expect output
Test and analyze data
Algorithms are the basis of any computer program. Before writing a
single line of code it is necessary to design an algorithm that solves
the problem. Therefore, a good programmer must be a good
problem solver and be knowledgeable of their own inputs.
Pseudo Code
Pseudo code is another program planning tool used for
planning program logic.
Pseudo code is a readable formally styled English like
language representation of the algorithm.
Pseudo code is a short hand way of describing a computer
program.
It uses English statements to describe what a program is to
accomplish. Pseudo code is used for documenting the
program or module design (also known as the algorithm).
Flowchart
Flowchart is diagrammatic representation of the logic for solving a
task.
Flowchart is a graphical representation of the algorithm.
Flowchart is drawn using boxes of different shapes with lines
connecting them to show the flow of control.
Flowchart Symbols:
Flowchart is drawn using different kind of symbols. A symbol
used in a flow chart is for specific purpose. The basic
flowchart symbols are given below:
Terminal:
It indicate the beginning, the end and
pauses in a programs logic flow.
Input/Output:
In a flowchart I/O symbols indicate the all
program instruction to I/O data from any input
device.
Processing:
A processing symbol represent arithmetic and
data movement instruction.
Decision:
It indicate a decision point.
Flow lines:
It indicates flow of a operation which is a
sequences of execution of instruction.
Connectors:
When a flowchart becomes so complex then we use
the connectors to indicate the link.
Example
Characteristics of a good program
A good program is readable.
A good program is well structured.
The program should also be well documented so that later
the author or any other programmer can understand the
program.
A good program must be portable.
The program should not have hard coded input values. This
implies that it should not be written to work for a particular
input value, but must be a general program that accept input
from user.
Reference
Computer Fundamentals by P.K Sinha and Priti Sinha.
Computer Fundamentals by Anita Goel.
Thanks