0% found this document useful (0 votes)
49 views7 pages

Programming Methodology

The document provides guidelines for programming methodology and style. It discusses meaningful naming of identifiers, clarity of expressions, use of comments and indentation. It also covers inserting blank lines and spaces, statement formatting style, characteristics of good programs, stages of the program development process, robustness, types of errors, documentation, modules of documentation, programmer's documentation, uses of documentation, and program maintenance.

Uploaded by

Abhishek
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
49 views7 pages

Programming Methodology

The document provides guidelines for programming methodology and style. It discusses meaningful naming of identifiers, clarity of expressions, use of comments and indentation. It also covers inserting blank lines and spaces, statement formatting style, characteristics of good programs, stages of the program development process, robustness, types of errors, documentation, modules of documentation, programmer's documentation, uses of documentation, and program maintenance.

Uploaded by

Abhishek
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 7

PROGRAMMING

METHODOLOGY
STYLISTIC GUI DELINES
Meaningful Names for Identifiers.
Guidliness followed while dealing with identifiers.
1. Assign meaningful names for all identifiers viz. Variables, function and procedures, etc.
2. Do not usesimilar looking names e.g., manage, manager.
3. Always assign names to scalar constants when it helps in clarity and redability.

Ensure clarity of expressions


Guideliness followed while dealing with clarity of expressions.
1. Avoid programming tricks whose intent will not be obvious to a reader.
2. Never sacrifice clarity of expressions even if changed (but unclear) expressions may get you minor
gain in machine execution time.
3. Use standard functions in expressions to enhance readablity.

Use comments and Indentation


1. Always insert prologues: - the comment in the beggining of a program.
2. Insert explanatory comments whenever applicable since they explain the role and purpose of other
identifiers and statements.
3. Use comments to help identify {...} pairs greatly and enhanceprogram understanding
4. Always indent statements to highlight nesting of groups of control statements.

Insert Blank Lines and Blank Spaces-The blank lines are inserted to seprate declaration blocks,
comment boxes, procedures and funtions etc. Normally, blank lines are inserted to separate declaration

This page was created using BCL ALLPDF Converter trial software.
To purchase, go to http://store.bcltechnologies.com/productcart/pc/instPrd.asp?idproduct=1

block, comment boxes, procedures and function etc. Normally, blank lines are inserted before label,
const, type, var declarations.

Statement formatting style - c++ is one of those languages which provides use of free formating style
program to print odd number from 100 to1 with statement in free formatting style
#include<iostream.h>
int main() {for (int i=99;i>0;i--) if(i%2) cout<<i<<' '; return 0 ; }

Defination -- when programming formatting is done to make a program more redable,it is called
prettyprinting.

Program to print odd no from 100 to 1


#include<iostream.h>
int main()
{ for(int i=99;i>0;i--)
cout<<i<<' ';
return 0 ;
}

characteristics of a good program


1) Effective and efficient - the program produces correct resut and it is faster
2) User friendly the program should be user friendly the user should not concerned about what is
happening inside program
3) Self documenting code a good programmer self documenting code
4) Reliable -- the program should reliable i.e, it must be handle unexpected situation like wrong data or
no data the programer should display proper eror message
5) Portable the program should be portable i.e, it should be run on different plateform

Stages of program development process


1) Crack the problem in the first stage the program is cracked and an algorithm is formulated which
gives the solution for the problem

This page was created using BCL ALLPDF Converter trial software.
To purchase, go to http://store.bcltechnologies.com/productcart/pc/instPrd.asp?idproduct=1

2) code the algorithm in this stage the program is translated into program using some programming
language
3) Compile the program after fedding the program next stage is to compile it
4) Execute the program after compilation f an error free program , the program is executed

ROBUSTNESS
The ability of a program, to recover following an error and to continue operating wihtin its enviroment ,
is called robustness.
The code which can handle exception data error and operational error is called guard code.

TYPE OF ERRORS
Compile-time errors
(i)

Syntax error occur when rules of a programming language are misused i.e., when a
grammatical rule of C++ is violated.

Syntax refers to formal rules governing the construction of valid statements in a language.
(ii)

Semantics error occurs when statements are not meaningful.


Semntics refers to the set of rules which give the meaning of a statement.

Run-Time errors
Errors that occur during the execution of a program are run-time errors.
Logical Errors
Something, even if you dont encounter any error during compile-time and run-time, your
program does not provide the correct result. This is because of the programmers mistaken
analysis of the problem he or she is trying to solve. Such errors are logical errors.

DOCUMENTATION

Documentation refers to written descriptions, specification, design, code and comment, internal to a
program, which make a program more understandable, readable and more easily modifiable.

MODULES OF DOCUMENTATION

This page was created using BCL ALLPDF Converter trial software.
To purchase, go to http://store.bcltechnologies.com/productcart/pc/instPrd.asp?idproduct=1

Modules make information easily accessible to the specific user for which they were prepared, and they
reduce the costs of production and maintenance. The documentation modules are generally to as
manuals.
The aggregation of modules and their detail would depend upon:
Complexity of system
Technical sophistication of user
People involved in development and use
Expected life of documentation

USER DOCUMENTATION
There are many types of user: the manager who supervises the operation of a computer application or
receives its printed reports; the manager or end user who may directly use an application through a
computer terminal; a clerk who prepares input for a computer and may even use its output.
A user documentation (or manual) should provide the following information

General descriptions
Output specifications
Runflow and description
File disposal
Logic flow
Error messages
Program testings
Special run instructions
File descriptions (if any)
Security considerations
Record layouts
Restart and Recovery procedures

General Description
Run flow
The program will prompt the user for inputting three numbers by flashing following message:
Enter three numbers
The user is supposed to enter three numbers in front of the message:

Output Specifications
The program gives the biggest of the three numbers by flashing the following message:

This page was created using BCL ALLPDF Converter trial software.
To purchase, go to http://store.bcltechnologies.com/productcart/pc/instPrd.asp?idproduct=1

The biggest of the three numbers is 9

Error Messages
The program may display following errors shown in two categories:
Category 1 Syntax errors
Unknown identifier
; Expected
Mixed-up ifs and elses
Category 2 Run-time errors
Incompatible values

Special Run Instructions


To run this program,
(1)Change to directory BC by typing following command:
C > CD BC
(2) Type the following command to open the program
C > BC Max
(3) Press ctrl + F9 to run the program.

Security Conditions
Please do not work on the program on Sundays and other holidays.

Restart and Recovery Procedure


If an error of category 1 is flashing, please contact your programmer.
If error of category 2 is displayed then restart the program and type numeric values between range 1.0E38 to 1.0E+38.

Programmers Documentation (technical documentation)


The technical documentation must always be provided so as to ensure smooth, easy and right
maintenance for the systems.The technical documentation is of two types:

This page was created using BCL ALLPDF Converter trial software.
To purchase, go to http://store.bcltechnologies.com/productcart/pc/instPrd.asp?idproduct=1

(1) External documentation


(2) Internal documentation
The external documentation of a program consists of the written information that is outside the body
of the source code. In addition to the detailed specifications the external documentation may include
the history of the programs development and subsequent modification, the top-down design, diagram
of the programs structures, and users manuals.

The internal documentation includes comments, self documenting code and program formatting
(prettyprinting). The goal of all these features is to make the program readable, understandable, and
easily modifiable.

Self documenting code is the source code that uses meaningful names for constants, variables, and
subprogram identifier to clarify their meaning in the program.

Prettyprinting refers to program formatting to make a program more readable.

Uses of Documentation

Facilitates communication about an application between the technical development personal


and non-technical users.
Useful for technical personnel not only during development, but also during operation and
normal maintenance.
Essential during abnormal or urgent maintenance.
Very helpful in initiating and training.
Enables trouble shooting when the application system break down.
Helps corporate management understand the system sufficiently to make decisions and to
appreciate its financial and resource implications.
Essential for both internal and external control.
Ensures that all commitments and expectations are on record.
Provides a package that will contain the information needed to change the system in case
environment or managements needs alter.
Prevents system dislocation and cost that might otherwise occure if knowledge of the system
were centered in a few individuals who resigned, relocated, or were subsequently reassigned
other duties.

This page was created using BCL ALLPDF Converter trial software.
To purchase, go to http://store.bcltechnologies.com/productcart/pc/instPrd.asp?idproduct=1

PROGRAM MAINTENANCE

Program maintenance refers to the modification of a program, after it has been completed, in
order to meet changing requirement or to take care of error that show up.

There could be four kinds of maintenance:

Corrective Maintenance. When a program after completion, is put to operations, some error
might show up because of some unexpected situation, untested areas. Such error are fixed up
and this type of maintenance, which is done to correct the errors
Adaptive Maintenance. Changes in the environment in which an information system operates
may also lead to systems maintenance.
Preventive Maintenance. If possible error could be anticipated before they actually occur, the
maintenance could be done to avoid them and the system down time can be saved.
Perfective Maintenance. In this rapidly changing world, information technology is the fastest
growing area. In information technology world, no technology has proved permanent.

This page was created using BCL ALLPDF Converter trial software.
To purchase, go to http://store.bcltechnologies.com/productcart/pc/instPrd.asp?idproduct=1

You might also like