Sunday, 13 December 2015

PROGRAMMING METHODOLOGY




SOFTWARE DESIGNING-






It basically involves two things-
(1) PROGRAM STRUCTURE
(2) PROGRAM REPRESENTATION


1.WHAT IS A GOOD PROGRAM?

A program which is written in good style and is readily understandable is called a good program.

2.HOW TO WRITE A GOOD PROGRAM?

*STYLISTIC GUIDELINES-
In order to write a good understandable program we need to follow certain stylistic guidelines which are as follows-
(1)MEANINGFUL NAMES FOR IDENTIFIERS
Identifiers are the building blocks of a program.They identify different parts of the program.hence providing meaning names to them makes a program more understandable.One should not use similar names for identifiers like manage and manager.
(2)ENSURE CLARITY OF EXPRESSION
While writing any program the programmer must not compromise with the clarity of the expression even if the changes brought causes increases in the machine execution time one must do it.
(3) USE COMMENTS AND INDENTATION
Comments provide internal documentation of a program
Indentation  makes the statements clear and readable.
(4)INSERT BLANK SPACES AND BLANK LINES
Insertion of blank spaces and blank lines increases the readability of the program.Blank lines must be inserted between declaration boxes,comment boxes etc and blank spaces must be inserted between operators.
(5)STATEMENT FORMATTING STYLE
C++ provides free formatting style i.e we can write n number of statements in the same line by using astatement separator but this reduces the readability of the program . So for a program to be presentable it is essential to format it so that it becomes easily readable , this is called pretty printing.


CHARACTERISTICS OF A GOOD PROGRAM---

(A) Effective and efficient
(B) User friendly
(C) Reliable
(D) Self documenting code
(E) Portable



STAGES OF PROGRAM DEVELOPMENT PROCESS

Program is needed to transform the input to output , for this we need a proper process. Program development process is a step by step process which includes basically four stages that are-
(1) Crack the problem-
The programmer first needs to understand and crack the problem and formulate an algorithm for it.
(2)Code the algorithm
In this stage the algorithm written must be translated into a program(source code) using programming language.
(3) Compile the program
This step involves the translation of the source code into the object code.
(4) Execute the program
This is the final step in this the error free program is executed.This phase is called run time.


ROBUSTNESS

The ability of a program to recover following an error and to continue operating within its same environment is called robustness.


GUARD CODE

The code which can handle exceptional data errors and operational errors is called guard code.


ERROR

An error which is also called a bug prevents a program from compiling and running correctly.

TYPES OF ERRORS--

(1) Compile time error
These are the errors which occur during the compilation time
There are two types of compile time errors
(a) Syntax errors
These arise when there is violation of the rules of programming language.
eg-X-Y*Z
This should actually be X=Y*Z
(b) Semantics errors
These occur when statements are not meaningful.
eg- C+D=A
This should be
A=C+D
(2) Run time errors
The errors which occur during the execution time are called run time errors.
(3) Logical errors
The errors which occur because of the implementation of an incorrect algorithm is called a logical error.
A program may not have any error during run time and compile time but still not produce the desired output because of logical error.


PROBLEM SOLVING METHODOLOGY

Solving a program is a difficult task.Certain steps have to be followed to solve the problems occurring in a program


(a) Understanding the problem well
(b) Analyse the problem
(c) Design an algorithm for the analysed problem
(d) Code the program
(e) Test and debug the program                                                    
(f) Complete documentation of the program
(g) Maintain the programs



DOCUMENTATION

It refers to the written description, specifications, code and comment, design , internal and external to a program in order to make it more understandable , readable and easily modifiable.

MODULES OF DOCUMENTATION

Modules make information easily accessible to the specific user for which they were prepared and reduces the cost of production and maintenance. The documentation modules are called manuals.
The aggregate of manuals and their details depend upon-

(a)The complexity of the system
(b) Technical sophistication of user.
(c) People involved in development
(d) Expected lifetime of documentation.


LIST OF MANUALS

(a) User manuals
(b)System manuals
(c) Program manuals
(d) Programmer manuals
(e)Input preparation manuals
(f) Equipment manuals
(g) Operational manual
(h) Standards manual

USE OF DOCUMENTATION

(1)It provides communication between the technical personnel and the non technical user
(2) It is useful for the technical personnel not only during the development time but also during the operations ans maintenance.
(3) Essential during abnormal maintenance
(4) Very helpful in initiating and training
(5) Enables trouble shooting when application system breaks down

PROGRAM MAINTENANCE

It refers to the modification of a program after it has been completed in order to meet changing requirements or to take care of the errors that show up

TYPES OF PROGRAM MAINTENANCE

(1) Corrective maintenance
(2) Adaptive maintenance
(3) Preventive maintenance
(4) Perfective  maintenance

STEPS TO DEVELOP A SYSTEM THAT IS EASY TO MAINTAIN

(A) The system should be planned with an eye to the future.
(B) User specifications should be correct.
(C) The system should be modular.
(D) Documentation should be complete
(E) Testing and debugging should be thorough
(F) Standards should be followed
(G) Adequate time should be allowed for the development cycle.
(H) Attention should be paid to end user
(F) The development team should be fully aware at the relationship of the system design and the system maintenance.


No comments:

Post a Comment