14 programming methodology
TRANSCRIPT
-
8/17/2019 14 Programming Methodology
1/37
WEL COME
PRAVEEN M JIGAJINNI
PGT (Computer Science)
MCA, MSc[IT], MTech[IT],MPhil (CompSci), PG!CA, A!CA,
!c Sc " En##
-
8/17/2019 14 Programming Methodology
2/37
Reference Book
CLASS XIBy
Sumita Arora
-
8/17/2019 14 Programming Methodology
3/37
C$A TER %%
R&GRAMMING
MET$&!&'&G(
-
8/17/2019 14 Programming Methodology
4/37
INTR&!)CTI&N
• Computerized information systems are
developed to provide computer
solutions to user problems.• The software should be designed
effectively so as to meet its objectives
of user satisfactions.
-
8/17/2019 14 Programming Methodology
5/37
INTR&!)CTI&N
The Software designing involves
mainly two things
1. Program Structure.
. Program !epresentation.
-
8/17/2019 14 Programming Methodology
6/37
PR&GRAM STRCTRE
• The program structure is decided using
top"down structure or any other popular
approach.• The main tas# is divided in to clear
logical sub tas#s there by deciding
about the sub routine and globalvariables information hiding etc.
-
8/17/2019 14 Programming Methodology
7/37
PR&GRAM REPRESENTATI&N
The program representation refers to its
presentation style so that the program
becomes readable and presentable.
A program which is easily understood can be
checked for errors if any, and easily modified.
It is learnt that normally 60-7! of time and"0! cost of the program is spent on testing,
debugging and modifying it.
-
8/17/2019 14 Programming Methodology
8/37
ST'ISTIC GI!E'INES
• $eveloping good program is s#ill and
writing good program is a %uality habit.
-
8/17/2019 14 Programming Methodology
9/37
ST'ISTIC GI!E'INES
• $eveloping good program is s#ill and
writing good program is a %uality habit.
-
8/17/2019 14 Programming Methodology
10/37
#eaningful $ames for
Identifiers &ssign 'eaningful names for identifiers
viz. variables( constants( functions etc)
$o not use similar loo#ing names li#eviz. manager( manage
&lways assign names to scalar
constants when it helps in clarity andreadability.
-
8/17/2019 14 Programming Methodology
11/37
%nsure clarity of %&pressions
*+pressions carry out the specified action ,s-.
Thus the must be clearly understood by the users.
Clarity of e+pressions should not be
compromised. &void programming tric#s whose intent
ill not be obvious to reader./ever sacrifice Clarity of e+pressions
even if changed e+pressions may get
minor gain in machine time.
-
8/17/2019 14 Programming Methodology
12/37
*e Comment* +n
Inent+tionComments play a very important
role as
they provide internaldocumentation of a program.
Always insert prologues that
comment in the beginning of aprogram.
-
8/17/2019 14 Programming Methodology
13/37
In*ert -l+n. 'ine* +n
Sp+ce* The insertion of blank lines and
spaces enhances the program
readability. they are to separatedeclaration blocks and comments.
Inserted before label, const.
variable declarations.
-
8/17/2019 14 Programming Methodology
14/37
Prett/ printin#
When program formatting is doneto make program more
readable, it is called prettyprinting.
-
8/17/2019 14 Programming Methodology
15/37
Ch+r+cteri*tic* &0 Goo
Pro#r+mEcient and e!ective
"ser friendly
#elf – documenting Code
$eliable
%ortable
-
8/17/2019 14 Programming Methodology
16/37
St+#e* &0 Pro#r+m
!e1elopment
Crack the problemCode the algorithm
Compile the program
E&ecute the program
-
8/17/2019 14 Programming Methodology
17/37
Ro2u*tne**
The ability of a program( to recover
following an error and to continue
operating within its environment is calledrobustness.
-
8/17/2019 14 Programming Methodology
18/37
Gu+r, co,e
The code which can handle e+ceptional
data errors and operational errors is
called guard code.
-
8/17/2019 14 Programming Methodology
19/37
T/pe* o0 Error
1.Compile"Time *rror
Synta+ error
0ccurs when rules of programming are misused
i.e when grammatical rule of c are violated.
Synta+ refers to formal rules governing the
construction of valid statements in a language.Semantics errors occur when statements are
not meaningful.
-
8/17/2019 14 Programming Methodology
20/37
Run3time Error*
*rror that occur during the e+ecution of
a program are run time errors. These
are harder to detect errors. Some runtime errors stop the e+ecution of the
program which is then called program
2crashed3 or 2abnormally3 terminated.
-
8/17/2019 14 Programming Methodology
21/37
'o#ic+l Error*
Sometimes even if you don4t encounter
any error during your compile time and
run time ( your program does notprovide the correct result. This is
because of programmer4s mista#en in
analysis of program she or he is tryingto solve. such errors are called logical
errors.
-
8/17/2019 14 Programming Methodology
22/37
ro2lem *ol1in#
metho,olo#/ +n, techni4ue*
5nderstanding the problem well. &nalyse the problem.
$esign the problem by
$eciding the step by step solution.
6rea#ing down solution into
smaller steps.
Code the program.
Test and debug your program.Complete your documentation.
-
8/17/2019 14 Programming Methodology
23/37
Te*tin# +n !e2u##in#
Testing is the process of 'ndingerrors in a program, and
debugging is the process ofcorrecting errors found duringtesting process.
-
8/17/2019 14 Programming Methodology
24/37
!ocument+tion
$ocumentation refers to written
descriptions specification (design (code
and comment ( internal and e+ternal toa program more understandable (
readable and more easily modifiable.
-
8/17/2019 14 Programming Methodology
25/37
Moule* o0 !ocument+tion
'odules ma#es information more easilyaccessible to the specific user for which they
were prepared ( and reduce the cost of
production and maintenance.
The documentation modules are generally
referred to as manuals .
7n detail it depends upon
1.Comple+ity of system.Technical sophistication of user
8.People involved in development and use
-
8/17/2019 14 Programming Methodology
26/37
'i*t o0 M+nu+l*
5ser manual
7nput Preparation 'anual
0peration 'anual
*%uipment 'anual
Programmer 'anual
System 'anual
Standards 'anual
-
8/17/2019 14 Programming Methodology
27/37
*er ocument+tion in0o
9eneral descriptions
!un flow and description
:ogic flow
Program testing;s
-
8/17/2019 14 Programming Methodology
28/37
Pro#r+mmer5* ocument+tion
The programmer4s 'anual provides the
technical part of documentation. This
manual is essential because it is the basis
of maintenance.
7t is of two types(
1.*+ternal documentation..7nternal documentation.
-
8/17/2019 14 Programming Methodology
29/37
6h+t i* e7tern+l
ocument+tion8
The e+ternal documentation of a
program consists of the writteninformation that is outside the body of
the source code.
7t may contain specifications of thehistory of the program4s development
and subse%uent modification.
-
8/17/2019 14 Programming Methodology
30/37
6h+t i* intern+l
ocument+tion8The internal documentation includes
comments ( self documenting code and
program4s formatting . The goal of thisfeatures to ma#e program
readable(
understandable ( and easily modifiable.
-
8/17/2019 14 Programming Methodology
31/37
6h+t i* *el0
ocumentin# coe8
7t is a code that uses meaningful namesfor constants( variables = subprogram
7dentifiers to clarify their meaning in theprogram.
-
8/17/2019 14 Programming Methodology
32/37
Pro#r+m m+inten+nce
%rogram maintenance refers to themodi'cation of a program , after it hasbeen completed . There are four kind ofmaintenance.
Corrective maintenance
#ome errors might show up because ofsome une&pected situations , untested
areas these errors are called Correctivemaintenance.
-
8/17/2019 14 Programming Methodology
33/37
&daptive maintenance
To accommodate changing needs (
time to time ( maintenance is done andis called adaptive maintenance.
-
8/17/2019 14 Programming Methodology
34/37
%reventive maintenance
If possible errors could be anticipated ,
before they actually occur, themaintenance could be done to avoidthem and the system down time( timefor which system remains out of order)
can be saved. This type of maintenanceaims at preventing errors is calledprogram maintenance.
Pro#r+m m+inten+nce
-
8/17/2019 14 Programming Methodology
35/37
*.The systems should be planned withan eye on the future.
+."ser speci'cation should be correct.
.The system should be modular
-.ocumentation should be complete./.#tandereds should be followed.
0.Testing should be through.
$o9 to e1elop
in0orm+tion th+t +re e+*/
to m+int+in8
-
8/17/2019 14 Programming Methodology
36/37
1.Ade2ate time should be allowed fordevelopment cycle.
3.Attetionshould be paid to end4users ,health and human factors should beconsidered.
5.The development team should be fullyaware at the relationship of systemdesign and system maintenance.
$o9 to e1elop
in0orm+tion th+t +re
e+*/ to m+int+in8
-
8/17/2019 14 Programming Methodology
37/37
T$AN:&