Professional Documents
Culture Documents
Syllabus: An overview: Problem identification, analysis, design, coding, testing & debugging,
implementation,
modification & maintenance; algorithms & flowcharts; Characteristics of a good program -
accuracy,
simplicity, robustness, portability, minimum resource & time requirement, modularization; Rules/
conventions of coding, documentation, naming variables; Top down design; Bottom-up design.
Basic Terminology
Input:-
The data entering into the computer is known as Input.
Output:-
The resultant information obtained by the computer is known as output.
Program:-
A sequence of instructions to solve the given problem is known as
Program.
Software:-
A group of programs to operate and controls the operation of a
computer.
Hardware:-
The physical components which are connecting to the computer
circuit.
1.Problem definition:-
Defining the problem is nothing but understanding the problem.It involves
3 specifications regarding problem solution.
i. Input specifications.
ii. output specifications
iii.processing
So, two things are two be discussed:
What is to be done , How much to be done.
3.Algorithm:-
A step by step procedure to solve the given problem is known as
Algorithm.
An algorithm can be described in a natural language such as English.
4.Flow chart:-
A symbolic (or) Graphical representation of given algorithm is
known as Flow chart.
3. Logical errors : These errors are produced due to wrong logic of program.
The logical are the most dangerous type of errors . The complete testing and
debugging phase of software development is dedicated to remove logical errors . (
Like :- A variable not initialized, Boundary case errors in loops ,
Misunderstanding of priority and associativity of operators etc )
It is very important to test the program written to achieve a specific task.
Testing involves the program with known data of which the results are known.
The results are known, the results produced by the computer can be verified.
7. Modification & maintenance :-
Some uncovered errors are reported by the user . These errors must be removed.
Moreover, there are changes in the user’s working environment. The user
requests the changes in the software according to his changing needs. The
developer modifies the software.
8.Documentation:-
It is the most important aspect of the programming. It is a continuous process
to keep the copy of the phases involved in problem definition,...........
........ , debugging and testing are the parts of the documentation.
This phase involves producing written document for the users.
---------------------------------------x-----------x-----------x-----------
x------------------------------------------------------
Characteristic of good program :
1. Correctness: a program should produce exactly what is desired.
3. Clarity: The program should be made in such a way that it should be easily
understandable to others. For this following point should be kept in mind:
documentation, indentation & naming of variables
4. Documentation/comments :
Unexecutable lines in a program are called comments. Those lines
are skipped by the compiler. The programmer should include comments in his
program. The comments enhance the understandability. Following are the points where
the documentation are essential:
• At the begging of the program about its purpose
• At if condition
• Just before loop
• Just before a set of statements for a specific purpose
• Just before a body of a function telling about its purpose
7. Robustness: A robust product can be one that doesn't break easily. Thus,
an operating system in which any individual application can fail without
disturbing the operating system or other applications can be said to be robust. ,
robust can describe one or more of several qualities:
a system that does not break down easily or is not wholly affected by a single
application failure
a system that either recovers quickly from or holds up well under exceptional
circumstances
------------------------------------x---------x----------x-----------
x------------------------------------------------------------------
Top down & Bottom-up design
These are two design approaches, which can be explained as:You can imagine a tree like
structure , in which when you are following top-down appoarch you move from root node
to leaf node and when you follow bottom-up apprach you follow leaf node to root node.
In structure programming, the unit of the program is function. To develop a
program, We have to write functions of procedures. Each function is a sub program,
which has declared to perform a specific task. This approach is also called procedure
centric. Here data is shifted from one procedure to another procedure for processing. This
approach is called Top-down –approach, in which a problem is divided into subparts and
they may be further divided into subparts.
On the basis of modular programming(moduler programming can be used to
break up a large program into manageable units) the program is designed in top-down
approach. As we go towards bottom, the task become simpler ans easy..... "Top
down" is a design methodology - it has nothing to do with a specific programming
language - it's a general method for designing software (and other systems) starting with a
high level architecture and working downwards to a more detailed implementation level.
.In object oriented approach, unit of problem is object. Each object is collection is
data & methods. Methods are bind with rather than shifting data between methods. This
approach is called data centric approach, where data is kept center in the design and all
methods comes around to this data. Object oriented approach is bottom-up-approach
where we start from bottom like finding objects than establish relationship between them.
--------------------x------------------------x------------------------
x--------------------------x-------------------------------------
What is Flowchart ?
How chart is a graphical representation of a program, using flowchart we can
understand the logic of program. There are some symbols representations which
used for making a flowchart. Through flowchart we can understand the flow of
data in easy manner.
Symbols for making a flowchart
1) Terminal Blocks
2) Input / Output Block:
3) Processing Box
4) Flow Lines
5) Decision Box
6) Connector
7) Annotation Box / Comments Box
This box is used to provide descriptive or explanatory information about the connecting flowchart
symbol.
.
NESTED IF STATEMENT
When a series of decisions are involved. We may have to use more than one if-else
statement in nested form.
Statement 1;
else
{
Statement 2;
else
Statement 3;
Statement x;
Condition
False Test
True
Condition
?
Statement 2
Statement 1
Statement 3
Statement x
Next statement
There is another way of putting if together when multipath decisions are involved. A
multipath decision is a chain if in which the statement associated with each else is an if.
Syntax :
if( condition-1 )
statement-1;
else-if ( condition-2)
statement-2;
else-if ( condition-3)
statement-3;
else-if ( condition-n)
statement-n;
else
default-statement;
statement-x;
60 to 79 1st division
50 to 59 2nd division
40 to 49 3rd division
00 to 39 Fail
grade = “ Fail ”;
else
printf(“Invalid Entry”);
Entry
Statement
True False
Condition
Statement Statement
Statement - x
next statement
---------------------x--------------------x----------------x---------------x--------------------x-------------------------
Algorithm
Step – 6 Stop.
Sorting algorithm :
Step – 3 Take
Step – 4 Display message and scan the values. These steps
repeats 10 times.
gets failed.
Step – 10 Exit.
Step – 4 Call the swap function and pass the two references.
robust
(adj.) When used to describe software or computer systems, robust can describe one or more of several qualities:
• a system that does not break down easily or is not wholly affected by a single application failure
• a system that either recovers quickly from or holds up well under exceptional circumstances
• a system that is not wholly affected by a bug in one aspect of it
• a system that comes with a wide range of capabilities. (It should be noted that this last sense of the term robust is not
uniformly accepted in technical circles. The term is typically used in this sense in the marketing of software or
computer systems to emphasize a selling point and does not refer to the first three meanings of the term.)
A robust product can be one that doesn't break easily. Thus, an operating system in
which any individual application can fail without disturbing the operating system or
other applications can be said to be robust.