+ All Categories
Home > Documents > Cn Case Tools Lab

Cn Case Tools Lab

Date post: 01-Dec-2014
Category:
Upload: sindhu-chowdary
View: 180 times
Download: 2 times
Share this document with a friend
79
Geethanjali College Of Engineering and Technology Cheeryal(V),Keesara (M),Ranga Reddy Dist. Program 1 : Character Stuffing Program : #include<stdio.h> #include<conio.h> #include<string.h> void main() { int n,i; long a; char str[100]=" ",temp[20]=" ",ch; FILE *fp1,*fp2,*fp3; clrscr(); fp1=fopen("input1.txt","r"); if(fp1==NULL) { printf("not created"); } fp2=fopen("z:/input2.txt","w"); printf("\n\t **Character Stuffing** \t\n"); printf("The Original Text is :"); fseek(fp1,0,SEEK_END); a=ftell(fp1); rewind(fp1); while((ch=fgetc(fp1))!=EOF) printf("%c",ch); rewind(fp1); printf("\n\t The Encoded Text is :"); while(!feof(fp1)) { if(a==ftell(fp1)) break; else { fscanf(fp1,"%s",str); fputs("stxdle ",fp2); Page 1 CN CASE TOOLS LAB III yr IT
Transcript
Page 1: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Program 1 : Character Stuffing

Program :

#include<stdio.h>#include<conio.h>#include<string.h>void main() {int n,i;long a;char str[100]=" ",temp[20]=" ",ch;FILE *fp1,*fp2,*fp3;clrscr();fp1=fopen("input1.txt","r");if(fp1==NULL){printf("not created");}fp2=fopen("z:/input2.txt","w");printf("\n\t **Character Stuffing** \t\n");printf("The Original Text is :");fseek(fp1,0,SEEK_END);a=ftell(fp1);rewind(fp1);while((ch=fgetc(fp1))!=EOF) printf("%c",ch);rewind(fp1);printf("\n\t The Encoded Text is :");while(!feof(fp1)){ if(a==ftell(fp1)) break; else { fscanf(fp1,"%s",str); fputs("stxdle ",fp2); printf("stxdle "); if(strstr(str,"dle")!=0) { fputs(str,fp2); printf("%s",str); fputs("dle",fp2); printf("dle"); }

Page 1CN CASE TOOLS LAB III yr IT

Page 2: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

else { fputs(str,fp2); printf("%s",str);} fputs(" etxdle ",fp2); printf(" etxdle "); }}fcloseall();fp2=fopen("z:/input2.txt","r");fp3=fopen("z:/input3.txt","w");printf("\n\t The Decoded Text is :") ;while(!feof(fp2)){ fscanf(fp2,"%s",str); if(strcmp(str,"stxdle")==0) fputs("",fp3); else if(strcmp(str,"etxdle")==0) fputs(" ",fp3); else if(strstr(str,"dledle")!=0) { n=strlen(str); n=n-3; strcpy(temp,str+n); fputs(str,fp3); } else { fputs(str,fp3); }} //for(i=0;i<n;i++) //temp[i]='\0'; fcloseall(); fp3=fopen("z:/input3.txt","r"); while((ch=fgetc(fp3))!=EOF) printf("%c",ch); fcloseall(); getch();}

Page 2CN CASE TOOLS LAB III yr IT

Page 3: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Result:

Input File: (Input1.txt)

This Is CN Lab.The Program dle is about idle character stuffing.

Output:

** CHARACTER STUFFING **

The Original Text is :

This Is CN Lab.The Program dle is about idle character stuffing.

The Encoded Text is:

stxdle This etxdle stxdle Is etxdle stxdle CN etxdle stxdle Lab. etxdle stxdle The etxdle stxdle Program etxdle stxdle dledle etxdle stxdle is etxdle stxdle about etxdle stxdle idledle etxdle stxdle character etxdle stxdle stuffing. etxdle

The Decoded Text is:

This Is CN Lab. The Program dle is about idle character stuffing.

Page 3CN CASE TOOLS LAB III yr IT

Page 4: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Program 2: Bit Stuffing

Program:

#include<stdio.h>#include<conio.h>#include<math.h>main(){int n,r,j,a=0,b=0,l=0,i=0,arr[200],bs[200];char ch;FILE *fp1;clrscr();fp1=fopen("input1.txt","r");printf("\t\t *** Bit Stuffing ** \n\n");printf("The Original Text is:\n\n ");while((n=ch=fgetc(fp1))!=EOF){printf("%c",ch);for(i=0;n!=0;i++){r=n%2;bs[i]=r;n/=2;}for(;i<8;i++)bs[i]=0;for(j=i-1;j>=0;j--,a++)arr[a]=bs[j];b=l=a;}getch();printf("\n\n The Text after Convertion to binary is:\n\n");for(i=0;i<b;i++)printf("%d",arr[i]);getch();printf("\n\n The Encoded Text is:\n\n");for(i=0;i<=7;i++){if(i==0||i==7)bs[i]=0;elsebs[i]=1;}for(i=0,j=8;i<=l;i++){

Page 4CN CASE TOOLS LAB III yr IT

Page 5: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

if(arr[i]==1){n++;bs[j]=arr[i];if(n==5){j++;bs[j]=0;}j++;}else{n=0;bs[j]=arr[i];j++;}}for(i=0;i<=7;i++){if(i==0||i==7)bs[i+j]=0;elsebs[i+j]=1;}j=j+7;for(i=0;i<=j;i++)printf("%d",bs[i]);getch();printf("\n\n The Decoded Text is:\n ");for(i=8,r=0;i<j-7;i++,r++)bs[r]=bs[i];for(i=r=l=n=0;i<=j-16;i++){if(bs[i]==1)n++;elsen=0;r=i;if(n==5){r++;l++;for(a=r+1;a<=j-16;a++,r++)bs[r]=bs[a];}}

Page 5CN CASE TOOLS LAB III yr IT

Page 6: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

for(i=0;i<b;i++)

printf("%d",bs[i]);getch();printf("\n The Text aft Conversion from binary text is:\n\n");for(i=0;i<b; ){for(a=0,n=7;n>=0;n--,i++)a=a+bs[i]*pow(2,n);printf("%c",a);

}fclose(fp1);getch();return (0);}

Page 6CN CASE TOOLS LAB III yr IT

Page 7: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Result:

Input File: (Input1.txt)

This is Computer_networks Lab.

Output:

** BIT STUFFING **

The Original Text is:

This is Computer_networks Lab.

The Text after Conversion to binary is:

010101000110100001101001011100110010000001101001011100110010000001100011011010110110101110000011101010111010001100101011100100101111101101110011001010111001110111011011110111001001101011011100110010000001101100011000010110001000101

The Encoded Text is:

01111110010101000110100001101001011100110010000001101001011100110010000001100011011110110110101110000011101010111010001100101011100100101111100110111001101011101000111011101101111011100100110101101110011001000000110110001100001011000010111001111110

The Decoded Text is:

010101000110100001101001011100110010000001101001011100110010000001100011011011110110110101110000011101010111010001100101011100100010111110110111001100100111010001110111011011110111001001101011011100110010000001101100011000010110001000101110

The Text after Conversion from binary to Text is:

This is Computer_networks Lab.

Page 7CN CASE TOOLS LAB III yr IT

Page 8: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Program 3: Cyclic Redundancy Check,CRC-12

Program:

#include<stdio.h>#include<conio.h>#include<string.h>#include<dos.h>#include<stdlib.h>int copy();int check();int i,j,k,t,count=0,num=0;int gen[10],frame[30],rem[30],temp[30];void main(){char c,plym[50];char ch[]={'0','1','2','3','4','5','6','7','8','9'};clrscr();printf("\t\t\t***CYCLIC REDUNDANCY CHECK-12***\n\n\n");for(i=0;i<50;i++)plym[i]='\0';for(i=0;i<30;i++)temp[i]=rem[i]=frame[i]='\0';for(i=0;i<10;i++)gen[i]='\0';printf("enter the polynomial: ");gets(plym);plym[strlen(plym)]='+';for(i=0;i<strlen(plym);i++){if(plym[i]=='x'){i++;for(;plym[i]!='+';count++,i++){}if(count==3){for(i=i-1,j=3;j<=9;j++)if(plym[i]==ch[j]){printf("\Enter the polynomial's");printf("degree is high");getch(); exit(0);}for(j=0,num=10;j<=2;j++)if(plym[i]==ch[j])

Page 8CN CASE TOOLS LAB III yr IT

Page 9: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

{num=num+j;frame[num]=1;}}if(count==2){for(i=i-1,j=1,num=0;j<=9;j++)if(plym[i]==ch[j])num=j;frame[num]=1;}if(count==0)frame[1]=1;count=0;}else if(plym[i]=='1')frame[0]=1;}printf("FRAME is: ");for(i=12,j=0;i>=0;i--,j++){temp[j]=frame[i];printf("%d",frame[i]);}printf("\n\n\n>>>>both high & low orders");printf("bits of GENERATOR must be 1<<<<");printf("\n enter the generator: ");for(num=i=0;(c=getchar())!='\n';i++,num++){if(c=='1')gen[i]=1;else if(c=='0')gen[i]=0;else{printf("\n Enter the GENERATOR");printf("is other then 0 or 1");getch(); exit(0);}}for(j=13,i=i-1;i>0;i--,j++)temp[j]=0;printf("\n\n FRAME after appending 0's: ");copy(); check();printf("\n The REMAINDER is: ");for(i=13;i<j;i++)

Page 9CN CASE TOOLS LAB III yr IT

Page 10: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

{temp[i]=rem[i];printf("%d",rem[i]);}printf("\n\n\n Transmitting FRAME......");delay(10000);printf("\n\n\n Transmitted FRAME is: ");copy(); check();printf("\n frame recieved");printf("\n\n\n checking for errors......");delay(10000);printf("\n\n\n recieved frame is: ");copy(); check();printf("\n the remainder is: ");for(i=13;i<j;i++)printf("%d",rem[i]);printf("\n DATA SENT SUCCESSFULLY");getch();}check(){for(i=0;i<=12;i++){if(rem[i]==0)continue;else{for(k=0,t=i;k<num;k++,t++){if(rem[t]==1 && gen[k]==1)rem[t]=0;else if(rem[t]==0 && gen[k]==0)rem[t]=0;else if(rem[t]==1 && gen[k]==0)rem[t]=1;else if(rem[t]==0 && gen[k]==1)rem[t]=1;}}}return 0;}copy(){for(i=0;i<j;i++){printf("%d",temp[i]);

Page 10CN CASE TOOLS LAB III yr IT

Page 11: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

rem[i]=temp[i];}return 0;}

Result:

Output :

*** CYCLIC REDUNDANCY CHECK-12 ***

Enter the Polynomial: x^12+x^6+x+1FRAME is: 1000001000011

>>>> Both High & Low order bits of GENERATOR must be 1 <<<<Enter the GENERATOR: 10010

FRAME after appending 0’s: 10000010000110000The REMAINDER is: 0110

Transmitting FRAME ………

The Transmitted FRAME is: 10000010000110110FRAME RECEIVED.

Checking for ERRORS………

Received FRAME is: 10000010000110110The REMAINDER is: 0000

DATA SENT SUCCESSFULLY.

Page 11CN CASE TOOLS LAB III yr IT

Page 12: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Program 4: Cyclic Redundancy Check,CRC-16

Program:

#include<stdio.h>#include<conio.h>#include<string.h>#include<dos.h>#include<stdlib.h>int copy();int check();int i,j,k,t,count=0,num=0;int gen[10],frame[30],rem[30],temp[30];void main(){char c,plym[50];char ch[]={'0','1','2','3','4','5','6','7','8','9'};clrscr();printf("\t\t\t***CYCLIC REDUNDANCY CHECk-16***\n\n\n");for(i=0;i<50;i++)plym[i]='\0';for(i=0;i<30;i++)temp[i]=rem[i]=frame[i]='\0';for(i=0;i<10;i++)gen[i]='\0';printf("Enter the polynomial: ");gets(plym);plym[strlen(plym)]='+';for(i=0;i<strlen(plym);i++){if(plym[i]=='x'){i++;for(;plym[i]!='+';count++,i++){}if(count==3){for(i=i-1,j=7;j<=9;j++)if(plym[i]==ch[j]){printf("\entered polynomial's");printf("degree is high");getch(); exit(0);}for(j=0,num=10;j<=6;j++)

Page 12CN CASE TOOLS LAB III yr IT

Page 13: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

if(plym[i]==ch[j]){num=num+j;frame[num]=1;}}if(count==2){for(i=i-1,j=1,num=0;j<=9;j++)if(plym[i]==ch[j])num=j;frame[num]=1;}if(count==0)frame[1]=1;count=0;}else if(plym[i]=='1')frame[0]=1;}printf("FRAME is: ");for(i=16,j=0;i>=0;i--,j++){temp[j]=frame[i];printf("%d",frame[i]);}printf("\n\n\n>>>>both high & low orders");printf("bits of GENERATOR must be 1<<<<");printf("\n Enter the generator: ");for(num=i=0;(c=getchar())!='\n';i++,num++){if(c=='1')gen[i]=1;else if(c=='0')gen[i]=0;else{printf("\n the Enter the generator");printf("is other then 0 or 1");getch(); exit(0);}}for(j=17,i=i-1;i>0;i--,j++)temp[j]=0;printf("\n\n FRAME after appending 0's: ");copy(); check();printf("\n The REMAINDER is: ");

Page 13CN CASE TOOLS LAB III yr IT

Page 14: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

for(i=17;i<j;i++){temp[i]=rem[i];printf("%d",rem[i]);}printf("\n\n\n Transmitting frame......");delay(10000);printf("\n\n\n TRANSMITTED FRAME is: ");copy(); check();printf("\n frame RECEIVED");printf("\n\n\n Checking for ERRORS......");delay(10000);printf("\n\n\n Recieved Frame is: ");copy(); check();printf("\n The REMAINDER is: ");for(i=17;i<j;i++)printf("%d",rem[i]);printf("\n DATA SENT SUCCESSFULLY");getch();}check(){for(i=0;i<=16;i++){if(rem[i]==0)continue;else{for(k=0,t=i;k<num;k++,t++){if(rem[t]==1 && gen[k]==1)rem[t]=0;else if(rem[t]==0 && gen[k]==0)rem[t]=0;else if(rem[t]==1 && gen[k]==0)rem[t]=1;else if(rem[t]==0 && gen[k]==1)rem[t]=1;}}}return 0;}copy(){for(i=0;i<j;i++){

Page 14CN CASE TOOLS LAB III yr IT

Page 15: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

printf("%d",temp[i]);rem[i]=temp[i];}return 0;}

Result:

Output:

*** CYCLIC REDUNDANCY CHECK-16 ***

Enter the Polynomial: x^16+x^12+x^10+x^6+x^5+x^4+x^3+x^2+x^1+1FRAME is: 10001010001111111

>>>> Both High & Low order bits of GENERATOR must be 1 <<<<Enter the GENERATOR: 100101

FRAME after appending 0’s: 1000101000111111100000The REMAINDER is: 01110

Transmitting FRAME ………

The Transmitted FRAME is: 1000101000111111101110FRAME RECEIVED.

Checking for ERRORS………

Received FRAME is: 1000101000111111101110The REMAINDER is: 0000

DATA SENT SUCCESSFULLY.

Page 15CN CASE TOOLS LAB III yr IT

Page 16: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Program- 5: Shortest Path Routing.

Program:

#include<stdio.h>#include<conio.h>main(){ int z,fe[10],fc[10],fg[10],hi[10],hf[10]; int a[10]={0,5,2,3,0,0,0,0,0,0}; int b[10]={0,0,0,0,3,0,0,0,0,0}; int c[10]={0,0,0,0,0,4,0,0,0,0}; int d[10]={0,0,0,0,0,0,4,0,0,0}; int e[10]={0,0,0,0,0,2,0,0,2,0}; int f[10]={0,0,0,0,0,0,0,5,0,0}; int g[10]={0,0,0,0,0,6,0,0,0,0}; int h[10]={0,0,0,0,0,0,0,0,0,1}; int i[10]={0,0,0,0,0,0,0,2,0,0}; int j[10]={0,0,0,0,0,0,0,0,0,0}; clrscr(); printf("\t\t***shortest path routing***\n\n"); printf("\n the shortest path routing table \n\n"); for(z=0;z<10;z++) { if(b[z]!=0) b[z]=a[1]+b[z]; else b[z]=0; if(c[z]!=0) c[z]=a[2]+c[z]; else c[z]=0; if(d[z]!=0) d[z]=a[1]+d[z]; else d[z]=0; } for(z=0;z<10;z++) { if(e[z]!=0) e[z]=e[z]+b[4]; else e[z]=0; if(g[z]!=0) g[z]=g[z]+d[6]; else g[z]=0;

Page 16CN CASE TOOLS LAB III yr IT

Page 17: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

} for(z=0;z<10;z++) { if(f[z]!=0) { fe[z]=e[5]+f[z]; fc[z]=c[5]+f[z]; fg[z]=g[5]+f[z]; } else { fe[z]=0; fc[z]=0; fg[z]=0; } } for(z=0;z<10;z++) { if(fc[z]<fe[z]&&fc[z]<fg[z]) f[z]=fc[z]; else if(fe[z]<fg[z]) f[z]=fe[z]; else f[z]=fg[z]; } for(z=0;z<10;z++) { if(i[z]!=0) i[z]=i[z]+e[8]; else i[z]=0; if(h[z]!=0) { hi[z]=h[z]+i[7]; hf[z]=h[z]+f[7]; } else { hi[z]=0; hf[z]=0; } if(hi[z]<hf[z]) h[z]=hi[z]; else h[z]=hf[z]; } printf("\tA\tB\tC\tD\tE\n");

Page 17CN CASE TOOLS LAB III yr IT

Page 18: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

printf("A\t"); for(z=0;z<5;z++) printf("%d \t",a[z]); printf("\nB\t"); for(z=0;z<5;z++) printf("%d \t",b[z]); printf("\nC\t"); for(z=0;z<5;z++) printf("%d \t",c[z]); printf("\nD\t"); for(z=0;z<5;z++) printf("%d \t",d[z]); printf("\nE\t"); for(z=0;z<5;z++) printf("%d \t",e[z]); printf("\nF\t"); for(z=0;z<5;z++) printf("%d \t",f[z]); printf("\nG\t"); for(z=0;z<5;z++) printf("%d \t",g[z]); printf("\nI\t"); for(z=0;z<5;z++) printf("%d \t",i[z]); printf("\nH\t"); for(z=0;z<5;z++) printf("%d \t",h[z]); printf("\n\n"); printf("\tF\tG\tH\tI\tJ\n"); printf("\nA\t"); for(z=5;z<10;z++) printf("%d \t",a[z]); printf("\nB\t"); for(z=5;z<10;z++) printf("%d \t",b[z]); printf("\nC\t"); for(z=5;z<10;z++) printf("%d \t",c[z]); printf("\nD\t"); for(z=5;z<10;z++) printf("%d \t",d[z]); printf("\nE\t"); for(z=5;z<10;z++) printf("%d \t",e[z]); printf("\nF\t"); for(z=5;z<10;z++) printf("%d \t",f[z]);

Page 18CN CASE TOOLS LAB III yr IT

Page 19: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

printf("\nG\t"); for(z=5;z<10;z++) printf("%d \t",g[z]); printf("\nI\t"); for(z=5;z<10;z++) printf("%d \t",i[z]); printf("\nH\t"); for(z=5;z<10;z++) printf("%d \t",h[z]); printf("\nthe shortest path from source 'a' to destination 'j' is: %d",h[9]); getch();}

Page 19CN CASE TOOLS LAB III yr IT

Page 20: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Result:

Output:

*** SHORTEST PATH ROUTING ***

THE SHORTEST PATH ROUTING TABLE

A B C D E A 0 5 2 3 0B 0 0 0 0 8C 0 0 0 0 0D 0 0 0 0 0E 0 0 0 0 0F 0 0 0 0 0G 0 0 0 0 0H 0 0 0 0 0I 0 0 0 0 0

F G H I JA 0 0 0 0 0B 0 0 0 0 0C 6 0 0 0 0D 0 7 0 0 0E 10 0 0 10 0F 0 0 11 0 0G 13 0 0 0 0I 0 0 12 0 0H 0 0 0 0 12

The Shortest Path from SOURCE ‘A’ to DESTINATION’J’ is : 12

Page 20CN CASE TOOLS LAB III yr IT

Page 21: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Program-6: Distance Vector Routing Algorithm

Program:

#include<stdio.h>#include<conio.h>Main(){

int i=0,a[5],b[5],c[5],d[5],e[5],ab[5];int ac[5],ad[5],ao[5],ba[5],bc[5],be[5];int bo[5],ca[5],cb[5],ce[5],co[5],da[5];int ec[5],eb[5],eo[5],dop[5];char node[5]={‘A’,’B’,’C’,’D’,’E’};clrscr();printf(“\t\t\t\ *** DISTANCE VECTOR ROUTING *** \n\n\n\”);printf(“\n Enter values for ‘a’:\n”);for(i=0;i<5;i++)

scanf(“%d”,&a[i]);printf(“\n Enter the values for ‘b’:\n “);for(i=0;i<5;i++)

scanf(“%d”,&b[i]);printf(“\n Enter the values for ‘c’:\n “);for(i=0;i<5;i++)

scanf(“%d”,&c[i]);printf(“\n Enter the values for ‘d’:\n “);for(i=0;i<5;i++)

scanf(“%d”,&d[i]);printf(“\n Enter the values for ‘e’:\n “);for(i=0;i<5;i++)

scanf(“%d”,&e[i]);printf(“\n\n THE ROUTERS TABLE WITH OPTIMUM VALUES:\n”);printf(“ \t ------------------------------------ \n”);printf(“\t A \t B \t C \t D\t E\n”);printf(“ \t ------------------------------------ \n”);printf(“%c\t”,node[0]);for(i=0;i<5;i++){

Ab[i]=a[1]+b[i];Ac[i]=a[2]+c[i];Ad[i]=a[3]+d[i];

}for(i=0;i<5;i++){

if(a[i]<ab[i] && a[i]<ac[i] &&a[i]<ad[i])Ao[i]=a[i];

else if(ab[i]<ac[i] && ab[i]<ad[i])

Page 21CN CASE TOOLS LAB III yr IT

Page 22: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Ao[i]=ab[i];else if(ac[i]<ad[i])

Ao[i]=ac[i];else

Ao[i]=ad[i];printf(“%d\t”,ao[i]);}printf(“\n %c \t “,node[1]);for(i=0;i<5;i++){

ba[i]=b[0]+ao[i];bc[i]=b[2]+c[i];be[i]=b[4]+e[i];

}for(i=0;i<5;i++){

if(b[i]<ba[i] && b[i]<bc[i] && b[i]<be[i])bo[i]=b[i];

else if(ba[i]<bc[i] && ba[i]<be[i])bo[i]=ba[i];

else if(bc[i]<be[i])bo[i]=bc[i];

elsebo[i]=be[i];

printf(“%d\t”,bo[i]);}printf(“\n%c\t”,node[2]);For(i=0;i<5;i++){

ca[i]=c[0]+ao[i];cb[i]=c[1]+bo[i];ce[i]=c[4]+e[i];

}for(i=0;i<5;i++){

if(c[i]<ca[i] && c[i]<cb[i] && c[i]<ce[i])co[i]=c[i];

else if(ca[i]<cb[i] && ca[i]<ce[i])co[i]=ca[i];

else if(cb[i]<ce[i])co[i]=cb[i];

elseco[i]=ce[i];

printf(“%d\t”,co[i]);}printf(“\n %c \t”,node[3]);For(i=0;i<5;i++)

da[i]=d[0]+ao[i];

Page 22CN CASE TOOLS LAB III yr IT

Page 23: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

for(i=0;i<5;i++){

if(d[i]<da[i])dop[i]=d[i];

elsedop[i]=da[i];

printf(“%d\t”,dop[i]);}printf(“\n%c\t”,node[4]);for(i=0;i<5;i++){

ec[i]=e[2]+co[i];eb[i]=e[1]+bo[i];

}for(i=0;i<5;i++){

if(e[i]<ec[i] && e[i]<eb[i])eo[i]=e[i];

else if(ec[i]<eb[i])eo[i]=ec[i];

elseeo[i]=eb[i];

printf(“%d\t”,eo[i]);}printf(“\n\t--------------------------- \n”);printf(“\n OPTIMUM COST FROM ROUTER-A TO ROUTER-E:”);printf(“%d”,ao[4]);getch();return();

}

Page 23CN CASE TOOLS LAB III yr IT

Page 24: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Result:

Output:

*** DISTANCE VECTOR ROUTING ***

Enter the values for ‘a’:0 5 2 3 6

Enter the values for ‘b’:5 0 4 8 3

Enter the values for ‘c’:2 4 0 5 4

Enter the values for ‘d’:3 8 5 0 9

Enter the values for ‘e’:6 3 4 9 0

THE ROUTERS TABLE WITH OPTIMUM VALUES

------------------------------A B C D E------------------------------

A 0 5 2 3 6B 5 0 4 8 3C 2 4 0 5 4D 3 8 5 0 9E 6 3 4 9 0

------------------------------

THE OPTIMUM COST FROM ROUTER-A TO ROUTER-E: 6

Page 24CN CASE TOOLS LAB III yr IT

Page 25: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Program-7: Simplified Decryption Encryption Standard

Program:#include<stdio.h>#include<conio.h>#include<math.h>int p,q,i=0,j=0,k=0,a=0,r=0,x=0,c=0.t=0,y=0,b[2];int binary[10],binmsg[500],temp[8],e[8],t4[4],tp[4];int p[10],key[10],newkey[10],key1[8],key2[8],p8[8];int ip[8]={2,6,3,1,4,8,5,7}ip_1[8]={4,1,3,5,7,2,8,6};int ep[8]={4,1,2,3,2,3,4,1},p4[4]={2,4,3,1},binmsg1[500];int s0[4][4]={1,0,3,2,3,2,1,0,0,2,1,3,3,1,3,2};int s1[4][4]={0,1,2,3,2,0,1,3,3,0,1,0,2,1,0,3};char ch;main(){

FILE *fp;clrscr();fp=fopen(“input1.txt”,”r”);printf(“\t\t\t ***SIMPLIFIED-DES***\n”);printf(“\n Original Message:\n”);

//Coverting Text to Binarywhile((a=ch=fgetc(fp))!=EOF){

printf(“%c”,ch);for(j=0;a!=0;j++){

r=a%2;a/=2;binary[j]=r;

}for(i=8-j;i>0;i__,j++)

binary[j]=0;for(i=j-1;i>=0;i--,x++)

binmsg[x]=binary[i];}printf(“\n\n Enter the 10 bit key: “);for(i=0;i<10;i++)

scanf(“%d”,&key[i]);//P10 User Defined

printf(“\n Enter the P10 Sequence” “);for(i=0;i<10;i++)

scanf(“%d”,&p10[i]);//Generating Key according to P10

for(i=0;i<10;i++){

j=p10[i]; j--;

Page 25CN CASE TOOLS LAB III yr IT

Page 26: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

newkey[i]=key[j];}

//LS-1 operationj=newkey[4];for(i=4,k=3;i>0;i--,k--)

newkey[i]=newkey[k];newkey[0]=j;J=newkey[9];for(i=9,k=8;i>5;i--,k--)

newkey[i]=newkey[k];newkey[5]=j;printf(“\n Enter the p8 sequence: “);for(i=0;i<8;i++)

scanf(“%d”,&p8[i]);//Generating KEY-1

printf(“\n key-1:”);for(i=0;i<8;i++){

j=p8[i]; j--;key1[i]=newkey[j];printf(“%d”,key1[i]);

}//LS-2 Operation

j=newkey[3]; a=newkey[4];for(i=4,k=2;i>=2;i--,k--)

newkey[i]=newkey[k];newkey[0]=j; a=newkey[9];for(i=9,k=7;i>=7;i--,k--)

newkey[i]=newkey[k];newkey[5]=j; newkey[6]=a;

//Generating KEY-2printf(“\n Key-2: “);for(i=0;i<8;i++){

j=p8[i];key2[i]=newkey[j];printf(“%d”,key2[i]);

}printf(“\n\n Cipher Message: “);for(i=0;i<x;){// considering 8-bit plain text

for(j=0;j<8;j++,i++)temp[j]=binmsg[i];

initp(); extp(); xor 1();fk(); switching();extp(); xor2(); fk(); ipinv();for(j=7,a=0,k=0;k<8;j--,k++,y++)

Page 26CN CASE TOOLS LAB III yr IT

Page 27: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

{binmsg1[y]=temp[k];a=a+temp[k]*pow(2,j);

}printf(“%c”,a);

}//Decryption

printf(“\n\n Decrypted Message is:”);for(i=0;i<y;){

for(j=0;j<8;j++,i++)temp[j]=binmsg1[i];

initp(); extp();xor2();fk(); switching();extp(); xor1(); fk(); ipinv();for(j=7,a=0,k=0;k<8;j--,k++)

a=a+temp[k]*pow(2,j);print(“%c”,a);

}getch();return 0;

}INITP(){//permutating using IP Function

For(j=0;j<8;j++){

a=ip[j]; a--;binary[j]=tamp[a];

}return 0;

}ipinv(){//Inverse Initial Permutation

for(j=0;j<8;j++){

a=ip_1[j]; a--;temp[j]=binary[a];

}return 0;

}switching(){//Switching

for(k=0,j=4;k<=3;k++,j++){

Page 27CN CASE TOOLS LAB III yr IT

Page 28: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

a=binary[k];binary[k]=binary[j];binary[j]=a;

}return 0;

}extp(){//Applying E/P Operation

for(j=0;j<8;j++){

a=ep[j]; a+=3;e[j]=binary[a];

}return 0;

}fk(){//Converting Binary to Decimal

p=e[0];q=e[3];r=p*2+q;p=e[1];q=e[2];c=p*2+q;

//Finding value in S-0 boxt=s0[r][c]a=0;compare();p=e[4];q=e[7];r=p*2+q;t=s1[r][c];compare();

//EX-OR operation between p4 & first 4bits of IPfor(j=0;j<4;j++){

a=p4[j];a--;tp[j]=t4[a];if(tp[j]==0&& binary[j]==0)

binary[j]=0;else if(tp[j]==1 && binary[j]==1)

binary[j]=0;else if(tp[j]==0 && binary[j]==1)

binary[j]=1;else if (tp[j]==1 && binary[j]==0)

binary[j]=1;}return 0;

Page 28CN CASE TOOLS LAB III yr IT

Page 29: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

}compare(){

if(t==0){

t4[a]=0; a++;t4[a]=0; a++;

}else{

for(j=0;t!=0;j++){

k=t%2;t/=2;b[j]=k;}

for(j=1;j>=0;j--,a++)T4[a]=b[j];

}return 0;

}Xor1(){//EX-OR operation b/w ep & key-2

for(j=0;j<8;j++){

if(e[j]==0 &&key2[j]==0)e[j]=0;

else if(e[j]==1 && key2[j]==1)e[j]=0;

else if(e[j]==1&&key2[j]==0)e[j]=1;

else if(e[j]==0&&key2[j]==1)e[j]=1;

}return 0;

}

Page 29CN CASE TOOLS LAB III yr IT

Page 30: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Result:

Input File (input1.txt):

Surendra and Pradeep

Output:

*** SIMPLIFIED –DES ***

Original Message:Suerndra and pradeep

Enter the 10 BIT KEY: 1 0 1 01 0 1 0 1 0

Enter the P10 Sequence: 4 2 1 7 8 3 9 5 10 6

Enter the P8 Sequence: 2 1 7 8 3 9 5 10

Key-1: 00110110Key-2: 11000101

Cipher Message:

Decrypted Message is: surendra and pradeep

Page 30CN CASE TOOLS LAB III yr IT

Page 31: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Program-8: Caeser Cipher Susbstitution Technique.

Program:#include<stdio.h>#include<conio.h>#include<string.h>main(){int c,i,n=0,key;char ch,cipher[100];FILE *fp;fp=fopen("input1.txt","r");clrscr();for(i=0;i<100;i++)cipher[i]='\0';printf("\t\t\t*** ceaser cipher substitution tech***\n\n\n");printf("the original text is:");while((ch=fgetc(fp))!=EOF)printf("%c",ch);fseek(fp,0,0);y:printf("\n\nenter the key");scanf("%d",&key);if(key>25){printf("\n\n***minimum value allowed for key is 25***\n");getch(); goto y;}printf("\n cipher text is :");/*encryption*/for(i=0;(n=fgetc(fp))!=EOF;){if(n==32){cipher[i]=' ';i++;printf(" ");}else{if(n>64&&n<91){c=(n+key)%91;if(c<65)

Page 31CN CASE TOOLS LAB III yr IT

Page 32: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

c=c+65;cipher[i]=c;i++;printf("%c",c);}else if(n>96 &&n<123){c=(n+key)%123;if(c<97)c=c+97;cipher[i]=c;i++;printf("%c",c);}}}printf("\n\nthe decrypted text is :");for(i=0;i<strlen(cipher);i++){n=cipher[i];if(n==32)printf(" ");else{if(n>64&&n<91){c=(n-key)%91;if(c<64)c=90-64+c;printf("%c",c);}else if(n>96&&n<123){c=(n-key)%123;if(c<97)c=122-96+c;printf("%c",c);}}}getch();return 0;}

Page 32CN CASE TOOLS LAB III yr IT

Page 33: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Result:

Output:

***CAESER CIPHER SUBSTITUTION ***

The Original text is : This is Anitha

Enter the key: 2

Cipher text is: vjku ku cpkvjc

The Decrypted text is : This is Anitha

Page 33CN CASE TOOLS LAB III yr IT

Page 34: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

LiBrary management system

SYSTEM REQUIREMENT SPECIFICATION

To model the library management system using ‘Object Oriented Analysis and Designing’ concept and the unified modelling language (UML) objective behind the development of this software is to model an object oriented system which helps the librarians to easily performs their activities. It must as a best interface between the librarian and the computer so as to perform the required activities effectively. It must cover the activites of maintaining the records of issued and received books and

Other things available in the library separately for both faculty and student when by taking the secario as a college. Uml diagrams drew below helps us to easily understand how the software is developed. The diagrams are class, usecase, sequence, collaborations, component and deployment diagrams.

Page 34CN CASE TOOLS LAB III yr IT

Page 35: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

CLASS DIAGRAMClass diagram shows structure of the software system. The class diagram shows a set of

class, interfaces and their relationships. The components are:a) Classb) Relationship

The forms of relationship are:1. Associations 2. Aggregations3. Generalization4. Compositions5. Dependency

Data base

student id : intfaculty id : int

update data()

book details

book no : intauthor : stringcost : float

add book()del book()

mags & jornels

mid : intjid : int

add()del()

publisher

pid : intpname : stringpaddras : string

add publisher()del publisher()

faculty

name : stringid : int

issue()renewal()return()cancel()enquiry()

issued books

<<->> book name : string<<->> book id : num<<->> issued date : date

<<+>> add books()

librarian

name : stringid : int

check details()check availability()check database()

Reservation

student idbook nameauthor name

priority()

book bank

studentname : stringid : int

issuing()returning()

library

coll name : stringcoll id : int

digital library

id : stringpassword : stringsys no : int

accessing()download()

student

name : srtingid : intlib card

issue of book bank()issue()renewal()returning()cancel()enquiry()

Page 35CN CASE TOOLS LAB III yr IT

Page 36: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

USE CSE DIAGRAMUse case diagram is created to visualize the interaction of our system with the outside

world. The components of use case diagrams are:

Use Case: Scenarios of the system

Actors: some or something who is interacting with the system

Relationship: semantic link between use case and actor. The forms of relationship are:

a) Associationb) Dependencyc) Generalization

Database

impossing fines

updates

librarian

publisher

reservation

recieve books

digital library

student

issue books

return books

faculty

reading books

Page 36CN CASE TOOLS LAB III yr IT

Page 37: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

INTERACTION DIAGRAM

An interaction diagram models the dynamic aspects of the system by showing the relationship among the objects and message they may dispatch. There are two types of interaction diagrams:

SEQUENCE DIAGRAM

Sequence diagram shows the steps to steps what much happen to accomplish a piece of functionality provided by the system. The components are:

a) Actors b) Objectsc) Messaged) Lifelinee) Focus of Control

COLLABORATION DIAGRAM

Collaboration diagrams displays object interactions organized around object and their links to one another. The components are:

a) Actorb) Objectc) Link

Page 37CN CASE TOOLS LAB III yr IT

Page 38: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Sequence diagram for issue and return of books

:student :books :Librarian :Faculty

refers

refer books

issue books

issue books

return books

update books

Page 38CN CASE TOOLS LAB III yr IT

Page 39: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Collaboration diagram for issue and return of books

:books:student

:Librarian

:Faculty

1: refers

2: refer books

3: issue books

4: issue books

5: return books

6: update books

Page 39CN CASE TOOLS LAB III yr IT

Page 40: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Sequence diagram for book bank

:student:librarian :books

refers

request for book bank

update records

issues book bank

Collaboration diagram for book bank

:librarian :books

:student

4: update records

2: request for book bank3: issues book bank1: refers

Page 40CN CASE TOOLS LAB III yr IT

Page 41: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Sequence diagram for database

:librarian :books details :student details :faculty details :database

checks

checks

checks

update all details

Page 41CN CASE TOOLS LAB III yr IT

Page 42: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Collaboration diagram for database

1: checks

:librarian

:books details

:student details

:faculty details

:database

3: checks

4: update all details

2: checks

Page 42CN CASE TOOLS LAB III yr IT

Page 43: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Sequence diagram for reservation

:librarian:books:student

refers

request for reservation

ask for book details

tells book details

issue book when available

Page 43CN CASE TOOLS LAB III yr IT

Page 44: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

:books:student

:librarian

1: refers

2: request for reservation

3: sk for book details

4: tells book details

5: issue book when available

ACTIVITY DIAGRAM

Activity diagram shows the flow of events within our systems. The components are:

a) Start stateb) End statec) Transactiond) Decision Boxe) Synchronization Barf) Swim lane

Page 44CN CASE TOOLS LAB III yr IT

Page 45: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

show id card

select operation

show lib card

issue renewal return

start operation

close operation

valid student

update database

validation/sucess

databaselibrarianstudent

Page 45CN CASE TOOLS LAB III yr IT

Page 46: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

STATE CHART State chart diagrams shows a life cycle of a single class. The state is a condition where the object may be in. The components are:

a) Start stateb) End statec) Stated) Transition

verify student details

make/remove reservation

pay dues(if any)

take/return book

Page 46CN CASE TOOLS LAB III yr IT

Page 47: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

calculate dues

issue book

update catalog

request for stock

manages

supply

Component diagramComponent diagrams provide a physical view of the current model. A component

diagram shows the organizations and dependencies among software components, including source code components, binary code components, and executable components.

Component diagram for library system

library

book stock details.jar

update application.dll

Page 47CN CASE TOOLS LAB III yr IT

Page 48: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

library

book stock details.jar

update application.dll

Page 48CN CASE TOOLS LAB III yr IT

Page 49: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Deployment DiagramDeployment diagram shows the physical architecture of the hardware and software in the system.

You can show the actual computers and devices, along with connections they have to each other and it can also show dependencies between components.

Deployment diagram for Library System

backup

library server

client-1 client-2

>> >><<<<Tcp/Ip>>

Page 49CN CASE TOOLS LAB III yr IT

Page 50: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Placement Section

SOFTWARE REQUIREMENT SPECIFICATION

Introduction

This product is developed for the purpose of Managing and maintaining details & its work of the placement section.

DOCUMENT CONVENTIONS

AGG : AggregateACCR : AccredationPO : Placement OfficerADMIN : Administration

INTENDED AUDIENCE

Company HR Placement Officer Developers Principal

PROJECT SCOPE

The scope of the project is to maintain the entire student database of the college ie student ID, Branch, 10th &12th marks, Aggregate details.

REFERENCES

UML 2 ToolKit by WLLEY publications.

DESCRIPTION

PRODUCT PERSPECTIVE

The origin of the product is derived from the examination section of the college. The examination section of the college contains only the academic details of the student during his course of study in the college.

Page 50CN CASE TOOLS LAB III yr IT

Page 51: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

In this product we maintain academic details, co-circular and extra circularactivites of every particular student

PRODUCT FEATURES

The main feature of this product is that it provides the entire details of the student in the format the company requires.

System should keep a track of students placed in organisation (ATLEAST ONE) and yet to be placed including the non placed student lacking areas.

BENEFITS

A well organised view of placements reducing confusion and steps to be taken for best results and reduce paper work and time of processing and saving turn over caused by them.

CLASS DIAGRAMClass diagram shows structure of the software system. The class diagram shows a set of

class, interfaces and their relationships. The components are:a) Classb) Relationship

The forms of relationship are:1. Associations 2. Aggregations3. Generalization4. Compositions5. Dependency

Page 51CN CASE TOOLS LAB III yr IT

Page 52: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

placement section

placement officer : string

collecting()approaching()

college

college code : stringaccr : stringname : string

approaching hr()counselling student()

student

name : stringid : intbranch : stringresume

fill application()appoinment letter()

company

name

return test()gd()hr interview()select student()

hr

namecompany name

shortlist students()select students()reject students()

technical interview

shortlisted student list

conduct interview()

USE CASE DIAGRAMUse case diagram is created to visualize the interaction of our system with the outside

world. The components of use case diagrams are:

Use Case: Scenarios of the system

Actors: some or something who is interacting with the system

Relationship: semantic link between use case and actor. The forms of relationship are:

a) Associationb) Dependencyc) Generalization

Page 52CN CASE TOOLS LAB III yr IT

Page 53: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Use-Case Diagram For Placement Section:

college management

company

visit recuriment

aptitude

gd

technical interview

personal interview

approaching hr

confermation letter

hr

counselling

student

Page 53CN CASE TOOLS LAB III yr IT

Page 54: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

INTERACTION DIAGRAM

An interaction diagram models the dynamic aspects of the system by showing the relationship among the objects and message they may dispatch. There are two types of interaction diagrams:

SEQUENCE DIAGRAM

Sequence diagram shows the steps to steps what much happen to accomplish a piece of functionality provided by the system. The components are:

f) Actors g) Objectsh) Messagei) Lifelinej) Focus of Control

COLLABORATION DIAGRAM

Collaboration diagrams displays object interactions organized around object and their links to one another. The components are:

d) Actore) Objectf) Link

Page 54CN CASE TOOLS LAB III yr IT

Page 55: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Sequence Diagram of Notification:

placement college company student

request

approach

accept

confermation

notify students

Collaboration Diagram of Notification:

placement

college

company

student

1: request

2: accept

3: approach4: confermation5: notify students

Page 55CN CASE TOOLS LAB III yr IT

Page 56: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Sequence Diagram of Interview:

placement section

company studenttudentss

approach

fill application

eligible students

written test

shortlisted students

technical round

Collaboration Diagram Of Interview:

placement section

company

studenttudentss

1: approach

2: fill application3: eligible students4: written test

5: shortlisted students6: technical round

Page 56CN CASE TOOLS LAB III yr IT

Page 57: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Sequence Diagram Of Appointment:

company student hr

hr round

shortlist student

appoinment letter

join

Collaboration Diagram of Appointment:

company

student hr

1: hr round2: shortlist student

3: appoinment letter

4: join

Page 57CN CASE TOOLS LAB III yr IT

Page 58: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

ACTIVITY DIAGRAM

Activity diagram shows the flow of events within our systems. The components are:

a) Start stateb) End statec) Transactiond) Decision Boxe) Synchronization Barf) Swim lane

Page 58CN CASE TOOLS LAB III yr IT

Page 59: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Activity Diagram For Placement Section:

request

student

fill application

company

written test G.DH.R. Interview

Technical Round

Short Listed Students

Conduct Interview

Select/Reject Students

Page 59CN CASE TOOLS LAB III yr IT

Page 60: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

STATE CHART State chart diagrams shows a life cycle of a single class. The state is a condition where the object may be in. The components are:

a) Start stateb) End statec) Stated) Transition

State-Chart Diagram For College:

Conformation Letter

Approach Companies

Issue Applications

Page 60CN CASE TOOLS LAB III yr IT

Page 61: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

State-Chart Diagram For Company:

G.D

Written Test

H.R.Interview

Select Students

State-Chart Diagram For Student:

Fill Application

Attend Interview

Appointment Letter

Page 61CN CASE TOOLS LAB III yr IT

Page 62: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

State-Chart Diagram For H.R.Manager

Shortlist Students

Select Students

Reject Students

Component diagram

Component diagrams provide a physical view of the current model. A component diagram shows the organizations and dependencies among software components, including source code components, binary code components, and executable components.

Page 62CN CASE TOOLS LAB III yr IT

Page 63: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Component Diagram For Placement Section:

placement.java

college.java

company.java

student.java

written test.dll

gd.dll

hr interview.dll

Deployment DiagramDeployment diagram shows the physical architecture of the hardware and

software in the system. You can show the actual computers and devices, along with connections they have to each other and it can also show dependencies between components

Page 63CN CASE TOOLS LAB III yr IT

Page 64: Cn Case Tools Lab

Geethanjali College Of Engineering and TechnologyCheeryal(V),Keesara (M),Ranga Reddy Dist.

Deployment diagram for Placement Section:

placement

college

company

student

Page 64CN CASE TOOLS LAB III yr IT


Recommended