Saturday, 12 October 2013

Insertion Sort Java

Insertion Sort example in Java.
The tool randomly picks up 50 integers and then sorts them using Insertion Sort algorithm.

The code for tool is given below (Java7) :
| Advertisement |

Validating date (DD/MM/YYYY) Java

The task is to create a tool in Java that takes a string as an input and validates if it is in date format (dd/mm/yyyy).

The source-code for the tool (Java 7) :

| Advertisement |

Validating an e-mail string Java

The assignment is to write code that validates if the input string can be an e-mail.

The code for tool is given below (Java7) :
| Advertisement |

Friday, 11 October 2013

Validate password string Java

The task is to create a tool in Java that takes a string as an input and validates if it can be a password.

The source-code for the tool (Java 7) :

| Advertisement |

Validate a username string Java

The task is to create a tool in Java that takes a string as an input and validates if it can be a username.

The source-code for the tool (Java 7) :

| Advertisement |

Finding a numeric string from an alphanumeric string Java

The assignment is to develop a tool in Java that takes an alphanumeric string as input and finds numeric sub-strings.

Simply, we need to print all the indexes where the numeric strings occurs in the alphanumeric string.

The source-code for the tool (Java 7) :
| Advertisement |

Thursday, 10 October 2013

Matching a word in a string java

The assignment is to develop a tool in Java that takes two inputs - the text string and the pattern; and finds all the matches of pattern in the text string.

Simply, we need to print all the indexes where the pattern occurs in the text string.

The source-code for the tool (Java 7) :


| Advertisement |

Wednesday, 9 October 2013

Halstead analysis tool in java

Read : http://en.wikipedia.org/wiki/Halstead_complexity_measures

The assignment is to write a small program that takes a source code file as an input, identifies n1, n2, N1 & N2; and then prints all Halstead's metrics as output.

Language of the source code (input file) : C

Language used to develop the tool : Java7

Source-code for the tool (Java7) :


Source-code for the input file (C) :


| Advertisement |