Pages

Advertisement

Wednesday, September 18, 2013

Program Documentaion

Program Documentation is defined as the details which describes a program. It is good programming exercise and practise to make a brief describing note on the programmer program segment while writing the program. The explanatory note is known as comment. This explains that how the program will be working and interacting with it.So, it helps other programmers in the understanding of the program easily.



There are two kinds of programming:

1. Internal Documentation
2. External Documentation



1. Internal Documentation:

Some details of the program may be built-in as an integral part of the program written. This is known as internal documentation. There are two important aspects of intern documentation as far as i know: selection of meaningful variable names and the use of comments.For the understanding of the program, the selection of meaningful names is crucial one. This can be illustrated in example as follows:

Area= Breadth*Length;

is more meaningful than

A=B*L;

And comments are used for explaining the action parts and identification in program. For eg,

/*include file* / describe the parts of program
/*header file* describes parts of program

2. External Documentation :

It is an executable program which is in the program and may be message to the user in order to respond to the program requirement. It is accomplished by the use of the output statements. And it makes a program more attractive and interactive.  SOme of the examples are as follows:

print " input the number one bye one"
print " Do you want to continue?"

If u like my blog then please comments ...ur feedbacks are welcome and i will be posting more in future.










Monday, September 16, 2013

Errors, Debugging and testing in Programming

ERRORS

 Errors is also known as buggs. Errors are the malfunctioning of the programming which may be due to incorrect syntax we write, wrong logics we used in the program and also can be occurred due to the run-time. There are 3 types of errors committed by programmers when doing the programming.
  
1. Syntax errors
2. Logic errors
3. Run-time errors




1. Syntax errors:

Syntax errors are those errors which is due to the violation of the rules of programming language on syntax.
On encountering these errors, a computer gives error message. Its easy to debug.




2. Logic errors:

Logic errors are those errors which is due to the wrong logic by the programmers or by missing of the statements. These types of errors are difficult to debug as we have to find these errors by ourselves and computer doesn't display such errors for us.


3. Run-time errors:

Run-time errors are those which is due to the execution of the ambiguous instructions by the programmers. Such error occurs due to the infinite loop statement , device errors ,software errors etc. The error message will be printed on the computer. Some of the run-time errors are as follows:

-Divide by zero , Null pointer assignment , Data overflow etc.




DEBUGGING:



Debugging is the process of discovering and removing the errors form a program. In debugging , we find the errors in the program and remove these errors so that the program runs correctly and orderly without errors.
One simple method for debugging is to place Print statement throughout the program which will be displaying the values of variables. This will display the dynamics of a program and let us to examine as well as compare the information at various points. Once location of an error is found and errors are corrected, then we can remove the debuggin statements.


TESTING:

It is the method of reviewing and executing a program with the aim of finding the errors in the program. It can be done manually and as well as computer based.

Manual Testing is one of the effecting error-detection process which is done before the computer based testing occurs. This manual testing includes code inspection by the programmers (us), by a test group and review by a peer group.



Computer based testing is done by the help of computer which is performed by the compiler. Compiler is hte program which will changes source codes into the codes understandable by the machines word by word).


In this blog , I give brief ideas about the errors , Debugging and testing which is required in the programming language. These are the terms and factors which play vital roles in the good programs. After testing , debuggin only , then the program is ready for the next step with the errorless codes.

If you have any comments please let me know in the comment box below.







Saturday, September 14, 2013

Flowchart, symbols and its importance in programming

In this blog, I will give the introduction about Flowchart and importance of flowchart in programming. After reading the post ,dont forget to comment. Your comments are valuable to me to go forward and post more posts. This is my first blog so there may be many mistakes which you can point out to me .

Flowchart :

A flowchart is the graphical or symbolic representation of an algorthim which uses various symbols and shapes to denote the different types of instructions. The clear and concise statements are used for writting the actual instructions within the boxes in flowchart. The boxes are then connected by solid lines which have arrow marks to indicate the flow of operation ie, the sequence for the execution of the instructions. 

Simple model of flowchart is as follows:



Normally an algorithm is represented in form of flowchart and the flowchart is expressed in some programming language to prepare computer program.


The main advantages of Flowchart are as follows:

  1. Any error in the logic of the procedure can be detected easily as flowchart is concerned with the details of the elements of programming language.
  2. Flowchart is easy to understand and convenient as well.
  3. Flowchart results in error free program.
  4. It acts like road-map for a programmer and also guides the path from the starting point to the final point while writing a computer program.
  5. Flowchart is helpful for beginners in order to create a good program with less errors.

 

 Flowchart Symbols:

Flowchart uses various types of shapes to denote different types of instructions. With the use of these symbols, the communication of program logic through flowcharts is easier. For eg. the symbol 'diamond' always means a decision. For the operation of the flowchart, we need only a few symbols to indicate.

The following are the various symbols used in the flowchart:



Friday, September 13, 2013

Introduction to C programming language and Its importance

In this blog, I will give the introduction about the C programming and the importance of C programming in Programming language. After reading the post ,don't forget to comment. Your comments are valuable to me to go forward and post more posts. This is my first blog so there may be many mistakes which you can point out to me .
Introduction to C programming language

C programming is one of the general purpose, structured programing language whose instructions consists of the terms which resembles the algebraic expression, augmented by many of the natural english keyword. for eg. if , else, for ,do,while etc. C programing have many additional features that allows it to be used at lower level which will bridge the gap between machine language and high level language. This feature of flexibility of c programing allows it to be used for sytem programming. For eg. for writing operating systems, for applications programming to write program to solve mathematical equation , for writing program to bill customers. C programing language also resembles many other high structure programming language such as pascal and fortran.


 

 

Importance of C programming language :

The popularity of C programming language has increased probably due to its many desirable qualities nowadays. 
  1. C Programming is rich set of built-in- functions and operators . The built-in-functions and operators can be used by the programmers to write any complex program.
  2. Similarly the C compiler combines the features of the high level language with an assemble language so we can write both the system software and bussiness packages with the help of c programming language.
  3.  Many C compilers are available in the market which are written in C programming language.
  4.  The programs written in C are fast and efficient which is due to the various of data types and powerful operators used in the C program. It is many times faster than BASIC
    (Beginners All Purpose Symbolic Instruction Code – a high level programming language).
  5.  Another important features of the C- program is to extend itself. C-programing is the collection of functions which is supported by C- Library. And the new functions can be added to the C-Library which will make the programming task simple and easy.

    C- Programming language is suited for structuring programming. So the user can think the problem in terms of function modules or blocks. The collection of these modules and blocks will be making a complete program for the users to make things easy. The modular structure makes the program debuggin, testing and maintenance.
      
                    Screenshot of C- Programing language screen

So this is the simple introduction to the C- programming language and its importances are described in brief. If its helpful and helped the beginners in some way, please do comments below. Your comments are valuable and i will be posting more of the C-programming languages.




Wednesday, August 7, 2013

software development models advantages and disadvantages

Advantages of waterfall model
It is a linear model
It is a segmental model
It is systematic and sequential
It is simple one
Its has proper documentations

Disadvantages of waterfall model
It is difficult to define all requirements at the beginning of project
This model is not suitable for accommodating any change
A working version of the system is not seen until late in the project's life.
It does not scale up well to large project
it involves heavy documentation
We cannot go in the background direction while SDLC performs
There is no sample model for clearly in realization the customers needs.
There is no risk analysis
If there is any mistake or error in any phase then we cannot make goon software
It is a document driven process that requires formal documents at the end of each phase.

Advantages of Prototyping models
Suitable for large system for which there is no manual process to define the requirements
User training to use the system
User services determination
System training
Quality of software is good
Requirements are not freezed.

Limitation of Prototyping Mode
It was difficult to find all the requirements of the software initially.
It was very difficult to predict how the system will be after development.

These two limitations will be removed in the prototyping model. First limitation is removing by unfreezing the requirements before any design or coding can proceed.
Second limitation is remove by making a throw away prototype to understand the requirements.

Limitations of Spiral Model
No strict standards for software development
No particular beginning or end of particular phase

Advantages of spiral model
It is risk driven model. It is very flexible
Less documentation is needed.
It uses prototyping

Disadvantages of spiral model
Lack of explicit process guidance in determining objectives, constraints, alternatives, relying on risk assessment expertise and providing more flexibility than required for many applications.

Tuesday, September 4, 2012

computer graphics project in c++-wave propagation

#include <dos.h>
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <math.h>

void main(void)
{
   /* request auto detection */
   int gdriver = DETECT, gmode, errorcode;
   int midx, midy;

   /* initialize graphics and local
      variables */
   initgraph(&gdriver, &gmode, "c:\\tc\\bgi");

   /* read result of initialization */
   errorcode = graphresult();
   if (errorcode != grOk)  /* an error
       occurred */
   {
      printf("Graphics error: %s\n", grapherrormsg(errorcode));
      printf("Press any key to halt:");
      getch();
      exit(1); /* terminate with an error  code */
    }

/////////////
  setcolor(13);
  settextstyle(2,0,4);
  outtextxy(200,0,"(== WAVE PRESENTATION ==)        PROGRAMED BY SUBIN JOSHI & SANJIT SINGH.");setcolor(14);
  outtextxy(10,13,"PRESS 1,2,3,4,5,6 AND 7 FOR CHANGING WAVE.     PRESS S FOR STOP    PRESS X FOR EXIT.");
  setcolor(2);  rectangle(7,25,getmaxx()-7,getmaxy()-7);
  setviewport(8,26,getmaxx()-8,getmaxy()-8,3);
//////////////

float qn= 0.1;
while(1)
{
float x=0,  y=250,r=50;
   for(float i=0;;i=i+qn)
     {
  setcolor(6);
  settextstyle(2,0,5);
  outtextxy(20,50,"SORT WAVE_________________________________________.");
  outtextxy(20,210,"LONG WAVE________________________________________.");
  outtextxy(20,360,"DUAL WAVE________________________________________.");
  outtextxy(20,430,"LINE_____________________________________________.");
if(kbhit())
{char a=getch();if(a=='1')qn=0.2;if(a=='2')qn=0.1;if(a=='3')qn=0.07; if(a=='4')qn=0.05;
if(a=='5')qn=0.03;if(a=='6')qn=0.02;  if(a=='7')qn=0.009;
if(a=='x'||a=='X')exit(0);if(a=='s'||a=='S')getch();}

       float b=y+r*cos(i); //cos(i/2);
       float bb=b/5;  //moveto(350,0);lineto(x,b);

putpixel(x,bb-20,12);/*upper wave*/putpixel(x,b-100,11);/* second wave*/
putpixel(x,bb+250,15);/*middle wave*/putpixel(x,b+50,15);//middle wave
putpixel(x,420,14);//line

  if(x>680){delay(500);clearviewport();break;}      x=x+1;  delay(2);
     }//for"for"loop
}//for while

 }
Related Posts Plugin for WordPress, Blogger...