Java program on datagram socket for client/server to display the message on client side, typed at the server side

import java.util.*; import java.net.*; import java.io.*; public class udpserver { public static void main(String args[]) { DatagramSocket aSocket=null; Scanner scan=new Scanner(System.in); int ServerPort=999; System.out.println("Server ready n Waiting for connectionn"); try…

Continue ReadingJava program on datagram socket for client/server to display the message on client side, typed at the server side

Using TCP/IP sockets, write a client-server java program to make the client send the file name and to make the server send back the contents of the requested file if present and Implement the above program using as message queues or FIFOs as IPC channels

import java.util.*; import java.net.*; import java.io.*; public class tcpserver { public static void main(String[] args) { try { ServerSocket s=new ServerSocket(998); System.out.println("Server Readynwaiting for connection ....."); Socket s1=s.accept(); DataOutputStream dos=…

Continue ReadingUsing TCP/IP sockets, write a client-server java program to make the client send the file name and to make the server send back the contents of the requested file if present and Implement the above program using as message queues or FIFOs as IPC channels

Java program for error detecting code using CRC-CCITT

import java.util.*; public class Crc { public static int n; public static void main(String[] args) { Scanner in=new Scanner(System.in); Crc ob=new Crc(); String code, copy, rec,zero="0000000000000000"; System.out.println("Enter message"); code=in.nextLine(); n=code.length();…

Continue ReadingJava program for error detecting code using CRC-CCITT

Implement three nodes point – to – point network with duplex links between them. Set the queue size, vary the bandwidth and find the number of packets dropped

#Create a simulator object set ns [new Simulator] #Open a trace file set nt [open lab1.tr w] $ns trace-all $nt #Open a nam trace file set nf [open lab1.nam W]…

Continue ReadingImplement three nodes point – to – point network with duplex links between them. Set the queue size, vary the bandwidth and find the number of packets dropped

java program to Design and implement the presence of Hamiltonian Cycle in an undirected Graph G of n vertices

import java.util.*; class Hamiltoniancycle { private int adj[][],x[],n; public Hamiltoniancycle() { Scanner src = new Scanner(System.in); System.out.println("Enter the number of nodes"); n=src.nextInt(); x=new int[n]; x[0]=0; for (int i=1;i x[i]=-1; adj=new…

Continue Readingjava program to Design and implement the presence of Hamiltonian Cycle in an undirected Graph G of n vertices

Design and implement in Java program to find a subset of a given set S = {Sl, S2,…..,Sn} of n positive integers whose SUM is equal to a given positive integer d

import java.util.Scanner; import static java.lang.Math.pow; public class subSet { /** * @param args */ void subset(int num,int n, int x[]) { int i; for(i=1;i

Continue ReadingDesign and implement in Java program to find a subset of a given set S = {Sl, S2,…..,Sn} of n positive integers whose SUM is equal to a given positive integer d