Tuesday, 16 December 2014
Sunday, 12 October 2014
Program to encrypt the given text message Ceaser Cipher
Caesar cipher encryption an decryption in java
public interface EncryptData {
public void encrypt();
public void decrypt();
}
public class SpaceEliminator {
String SplitStr="";
String SplitResult="";
SpaceEliminator(String x)
{
SplitStr=x;
}
public String toString()
{
SplitResult=SplitStr.replaceAll("\\s+","");
return SplitResult;
}
}
public class CeaserCipher extends SpaceEliminator implements EncryptData {
String EncyptedData = "";
String DecyptedData = "";
String InputString;
CeaserCipher(String x) {
super(x);
}
public void getString(String data)
{
InputString=data;
}
public void encrypt()
{
char[] alpha={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r'
,'s','t','u','v','w','x','y','z'};
char[] CharStr=InputString.toCharArray();
for(int i=0;i<CharStr.length;i++){
for(int j=0;j<alpha.length;j++){
if(CharStr[i]==alpha[j]){
if(j==23)
EncyptedData +=alpha[0];
else if(j==24)
EncyptedData +=alpha[1];
else if(j==25)
EncyptedData +=alpha[2];
else
EncyptedData +=alpha[j+3];
}
}
}
System.out.println("Encypted String "+EncyptedData);
}
public void decrypt()
{
char[] alpha={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r'
,'s','t','u','v','w','x','y','z'};
char[] CharStr=EncyptedData.toCharArray();
for(int i=0;i<CharStr.length;i++){
for(int j=0;j<alpha.length;j++){
if(CharStr[i]==alpha[j]){
if(j==0)
DecyptedData +=alpha[23];
else if(j==1)
DecyptedData +=alpha[24];
else if(j==2)
DecyptedData +=alpha[25];
else
DecyptedData +=alpha[j-3];
}
}
}
System.out.println("Decypted String "+DecyptedData);
}
}
public interface EncryptData {
public void encrypt();
public void decrypt();
}
public class SpaceEliminator {
String SplitStr="";
String SplitResult="";
SpaceEliminator(String x)
{
SplitStr=x;
}
public String toString()
{
SplitResult=SplitStr.replaceAll("\\s+","");
return SplitResult;
}
}
public class CeaserCipher extends SpaceEliminator implements EncryptData {
String EncyptedData = "";
String DecyptedData = "";
String InputString;
CeaserCipher(String x) {
super(x);
}
public void getString(String data)
{
InputString=data;
}
public void encrypt()
{
char[] alpha={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r'
,'s','t','u','v','w','x','y','z'};
char[] CharStr=InputString.toCharArray();
for(int i=0;i<CharStr.length;i++){
for(int j=0;j<alpha.length;j++){
if(CharStr[i]==alpha[j]){
if(j==23)
EncyptedData +=alpha[0];
else if(j==24)
EncyptedData +=alpha[1];
else if(j==25)
EncyptedData +=alpha[2];
else
EncyptedData +=alpha[j+3];
}
}
}
System.out.println("Encypted String "+EncyptedData);
}
public void decrypt()
{
char[] alpha={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r'
,'s','t','u','v','w','x','y','z'};
char[] CharStr=EncyptedData.toCharArray();
for(int i=0;i<CharStr.length;i++){
for(int j=0;j<alpha.length;j++){
if(CharStr[i]==alpha[j]){
if(j==0)
DecyptedData +=alpha[23];
else if(j==1)
DecyptedData +=alpha[24];
else if(j==2)
DecyptedData +=alpha[25];
else
DecyptedData +=alpha[j-3];
}
}
}
System.out.println("Decypted String "+DecyptedData);
}
}
p = sin(x) + cos(y) + tan(z) Java Program
Write a program to create multiple threads to
perform concurrent operations to solve the following equation.
p = sin(x) + cos(y) +
tan(z)
Source code :
public class MathSin extends Thread {
double deg,result;
public MathSin(double degree)
{
deg=degree;
}
public void run()
{
result=Math.sin(deg);
}
}
public class MathCos extends Thread {
double deg,result;
public MathCos(double degree)
{
deg=degree;
}
public void run()
{
result=Math.cos(deg);
}
}
public class MathTan extends Thread {
double deg,result;
public MathTan(double degree)
{
deg=degree;
}
public void run()
{
result=Math.tan(deg);
}
}
public class MathThread {
public static void main(String[] args) {
double totaladd;
MathSin sin=new MathSin(45.0);
MathCos cos=new MathCos(45.0);
MathTan tan=new MathTan(45.0);
sin.start();
cos.start();
tan.start();
try{
sin.join();
cos.join();
tan.join();
totaladd=sin.result+cos.result+tan.result;
System.out.println("sin(x) + cos(x) +tan(x) :"+totaladd);
}catch(InterruptedException IntExp){
}
}
}
Saturday, 4 October 2014
Friday, 3 October 2014
5G Mobile and Wireless Communications IEEE Papers
Hi
We all know that IEEE papers are not avaiable for free anywhere ,
i want to share the IEEE paper which i bought from IEEE explorer , The most searched IEEE papers like 5G mobile technology and Data mining are available , Let me first provide you paper called
" Scenarios for 5G Mobile and Wireless Communications "
IF u have any doubt please go through the below videos
https://www.youtube.com/watch?v=UhUTuJesYO8
Download link for IEEE paper :
http://goo.gl/celjtc
or
http://goo.gl/owRH0O
Latest and most searched IEEE papers will be updated soon .
We all know that IEEE papers are not avaiable for free anywhere ,
i want to share the IEEE paper which i bought from IEEE explorer , The most searched IEEE papers like 5G mobile technology and Data mining are available , Let me first provide you paper called
" Scenarios for 5G Mobile and Wireless Communications "
IF u have any doubt please go through the below videos
https://www.youtube.com/watch?v=UhUTuJesYO8
Download link for IEEE paper :
http://goo.gl/celjtc
or
http://goo.gl/owRH0O
Latest and most searched IEEE papers will be updated soon .
FIFA 15 Key Gen
Hi friends !
Good to post after long time , For this time i am going to share hack tool which i created for FIFA 15.
Working perfectly verified with all the platform given . This keygen will work for PC , PS4 and xbox 360
and working to make it across some other platforms also , Please give me some time .
https://www.youtube.com/watch?v=4ShO450gevo
or
http://www.dailymotion.com/video/x272eem_fifa15-key-gen_videogames
Please check out the above video and follow the steps as it is .
Also
download link for keygen
http://bit.ly/1v6nP6T
or
http://bit.ly/1thPRub
Enjoy the game
Good to post after long time , For this time i am going to share hack tool which i created for FIFA 15.
Working perfectly verified with all the platform given . This keygen will work for PC , PS4 and xbox 360
and working to make it across some other platforms also , Please give me some time .
https://www.youtube.com/watch?v=4ShO450gevo
or
http://www.dailymotion.com/video/x272eem_fifa15-key-gen_videogames
Please check out the above video and follow the steps as it is .
Also
download link for keygen
http://bit.ly/1v6nP6T
or
http://bit.ly/1thPRub
Enjoy the game
Subscribe to:
Comments (Atom)