View Full Version : new programmer: alphabetical order?
soccersquirt82
Aug 23, 2008, 01:24 PM
How do I put four strings in alphabetical order? I haven't learned how to use arrays yet and I think I'm supposed to use something with "compareTo". Where do I start?
lee1210
Aug 23, 2008, 03:02 PM
First off, you should always say when you are working on something for a class, so people don't write a lot of code for you, but point you towards documentation instead.
With that said:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Arrays.html
There are sort methods. See which ones will help you (I assume this is for Java, as that was what your previous questions were about).
-Lee
p.s. I re-read... to use any of that, you need to have the strings in an array first.
http://java.sun.com/docs/books/jls/third_edition/html/arrays.html
There's the chapter in the language specification about arrays. Once you know how to get an array of some type, you can use the sort methods found in the Arrays document linked above as long as the type implements Comparable.
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Comparable.html
You only have to worry about compareTo when you define your own class that you want to implement Comparable, or extend a class that does not already implement Comparable and make it so. You can check the API docs to see if a particular class already implements Comparable. For example:
http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html
Every class reference lists what class this class extends, and what interfaces it implements.
soccersquirt82
Aug 24, 2008, 04:06 PM
I'm supposed to call a method by referring to an instance. Should I still use an array? I haven't learned how to yet in class, but I can (try to) learn online. Thanks!
lee1210
Aug 24, 2008, 04:48 PM
If you're not using an array, then that would mean you'd be using N separate string instances. When N is very low, say 3, the orderings available is not too high, and it isn't too hard to just write some control logic to deal with this. However, as N grows the orderings grow combinatorially. This means a LOT of control structures, and you'll only have the ability to solve for a fixed number of strings.
If you did have three strings, the solution in pseudocode would be something like:
if(stringA < stringB) then
if(stringB < stringC) then
//The ordering is A->B->C
else
if(stringA < stringC) then
//The ordering is A->C->B
else
//The ordering is C->A->B
else
if(stringC < stringB) then
//The ordering is C->B->A
else
if(stringC < stringA) then
//The ordering is B->C->A
else
//The ordering is B->A->C
In this psuedocode i just used indentation level to indicate control structure nesting (like python) and pretended that < could be used to lexographically compare strings. In most languages you cannot do something like that, so you'd have to use some comparison function like compareTo.
I'm not sure if this is what you meant. Your instructor should clarify the project if you don't know where the strings you are comparing are coming from, if you can use arrays, if you're supposed to write your own sort (if so, what kind? Bubble? Merge?), etc. Otherwise it's just a crapshoot, and you could interpret the problem dozens of ways.
-Lee
Flynnstone
Aug 24, 2008, 04:57 PM
What language?
I "C", you could have a array of pointers to strings.
Then sing something like a bubble sort (or other sort) to make the array ordered.
soccersquirt82
Aug 24, 2008, 06:45 PM
OK. That seems confusing, so it might be better if I learned what arrays are and try it that way. I have to prompt for four strings and display the one that comes first in alphabetical order.
soccersquirt82
Aug 24, 2008, 06:55 PM
I have no idea where to even start. I read those documents, but I feel like they're talking in a second language. Help!!
lee1210
Aug 24, 2008, 06:58 PM
OK. That seems confusing, so it might be better if I learned what arrays are and try it that way. I have to prompt for four strings and display the one that comes first in alphabetical order.
Oh, that doesn't require sorting of a list at all, then. You just need to be able to compare two strings. I won't tell you what algorithm to use, but you don't even need to be able to store all 4. See if that isn't enough to figure it out. I would not do this project with arrays.
-Lee
soccersquirt82
Aug 24, 2008, 08:06 PM
I used boolean. I then used a compareTo method. After I prompted for three strings, I think I should use an if-then statement. Is this right or am I totally off? And if this is right, I don't know what to do after this.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
static boolean compareTo (Scanner scan)
{
String string1, string2, string3;
System.out.print("Enter name 1:");
string1= scan.nextLine();
System.out.print("enter name 2: ");
string2= scan.nextLine();
System.out.print("enter name 3: ");
string3= scan.nextLine();
if(string2.compareTo(string1))
lee1210
Aug 24, 2008, 08:17 PM
Well, you've got the I/O going, it looks like.
Otherwise, what is compareTo going to be returning? Why call it compareTo since you're not implementing the Comparable interface (which requires a method called compareTo that returns an int, and accepts an Object as its only parameter)? You're not comparing the class Alphabetical to anything, you're comparing some strings.
Once you have all of your strings, if you really want to store all of them, you can put together a short set of ifs. Since you don't need to sort these, you don't need the convoluted, nested logic that I offered in pseudocode above. You only need to know one thing. You don't care what the second string in lexicographical order is, only the first. How would you find this?
-Lee
soccersquirt82
Aug 24, 2008, 08:35 PM
Is it something like this? This was on the compareTo method, and I'd thought I'd try it. I used precedes instead of compareTo.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
public boolean precedes (String s1, String s2, String s3)
{
Scanner scan = new Scanner (System.in);
System.out.print("Enter name 1:");
s1= scan.nextLine();
System.out.print("enter name 2: ");
s2= scan.nextLine();
System.out.print("enter name 3: ");
s3= scan.nextLine();
if (s1.charAt(k) = s2.charAt(k))
return s1.charAt(k) < s2.charAt(k);
}
return sl.length() < s2.length();
}
lee1210
Aug 24, 2008, 08:50 PM
Is it something like this? This was on the compareTo method, and I'd thought I'd try it. I used precedes instead of compareTo.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
public boolean precedes (String s1, String s2, String s3)
{
Scanner scan = new Scanner (System.in);
System.out.print("Enter name 1:");
s1= scan.nextLine();
System.out.print("enter name 2: ");
s2= scan.nextLine();
System.out.print("enter name 3: ");
s3= scan.nextLine();
if (s1.charAt(k) = s2.charAt(k))
return s1.charAt(k) < s2.charAt(k);
}
return sl.length() < s2.length();
}
You've got to think a bit more about the design. What does precedes return? You've passed in 3 strings (though you then throw away their values and get new ones from your Scanner), so what does a true return represent? What does a false represent? You need to know which of the 3 (or 4, you stated earlier) is the first alphabetically.
Also, charAt is not necessary for string comparison. There's already a string method that does comparisons on the whole strings for you. Also, in an if you have an assignment statement. This will not compile in Java. In some other languages this would always evaluate to true, in some it will evaluate to true unless the value being assigned is 0. == is the equivalence operator. You also have a return statement outside of a method. This will not compile, either.
If you are required to use charAt and length to determine which String is first alphabetically, you can. I would put this in a separate method.
-Lee
soccersquirt82
Aug 24, 2008, 09:13 PM
Any closer? I have no idea what I am doing.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
public boolean precedes (Scanner scan)
{
Scanner scan = new Scanner (System.in);
String s1, s2, s3;
System.out.print("Enter name 1:");
s1= scan.nextLine();
System.out.print("enter name 2: ");
s2= scan.nextLine();
System.out.print("enter name 3: ");
s3= scan.nextLine();
if (s1.compareTo(null) == s2.compareTo(null))
return s1.compareTo(null) < s2.compareTo(null);
}
return sl.length() < s2.length();
}
lee1210
Aug 24, 2008, 09:31 PM
Any closer? I have no idea what I am doing.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
public boolean precedes (Scanner scan)
{
Scanner scan = new Scanner (System.in);
String s1, s2, s3;
System.out.print("Enter name 1:");
s1= scan.nextLine();
System.out.print("enter name 2: ");
s2= scan.nextLine();
System.out.print("enter name 3: ");
s3= scan.nextLine();
if (s1.compareTo(null) == s2.compareTo(null))
return s1.compareTo(null) < s2.compareTo(null);
}
return sl.length() < s2.length();
}
It will not help you learn anything if this is designed for you, so you need to work that out on your own. What should your function return? (Hint: What does your program need to display?)
String's compareTo method will compare the String it is called on to something else. Passing null to compareTo will result in a NullPointerException. Look at this documentation:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#compareTo(java.lang.String)
What is the return value, and what does it represent? What is the parameter that is passed in?
Stop writing code and start thinking about the design. If you don't have any idea what's going on, try to fix that before you start writing your program. Try to think about this independently of a computer program. If you are asking someone to give you some names. They give you the name susie. You have to remember that name. You ask them for another name, they give you abe. What do you need to remember? What do you need to decide about abe and susie?
-Lee
soccersquirt82
Aug 24, 2008, 10:16 PM
I give up on this one. Thanks for trying, though.
lee1210
Aug 24, 2008, 10:40 PM
I give up on this one. Thanks for trying, though.
Quite a waste of a day then, eh?
If you have a chance, go back and answer the questions I posed. If you still don't know what to do with them, post the answers and we'll see where it leads.
-Lee
soccersquirt82
Aug 25, 2008, 06:42 PM
OK, I'm trying again. My function should return the string that comes first in alphabetical order. I need three strings to compare. I should compare the first string with the second string. The one that comes first in alphabetical order should be compared to the third string. The one that comes first out of that comparison is the one that comes first of all three strings. That is the one my program needs to display.
soccersquirt82
Aug 25, 2008, 07:04 PM
I still can't figure out what to do. :confused:
lee1210
Aug 25, 2008, 07:29 PM
OK, I'm trying again. My function should return the string that comes first in alphabetical order. I need three strings to compare. I should compare the first string with the second string. The one that comes first in alphabetical order should be compared to the third string. The one that comes first out of that comparison is the one that comes first of all three strings. That is the one my program needs to display.
This is exactly right.
So you can have a function firstAlphabetical that returns a String, and it takes 3 String arguments.
Then you just need to compare them as you described. You can keep a string called lowest, and assign whichever is lowest alphabetically between the first argument and the second argument. Then you can compare your string called lowest to your third argument. If the third argument is lower, that will get assigned to lower, otherwise you do nothing. you can then return lowest.
Then in main, you would read in your 3 strings, then pass them to your firstAlphabetical function. You could either assign the result to a string, or just print it's result.
-Lee
soccersquirt82
Aug 25, 2008, 08:35 PM
Here is what I tried. I get two errors that say, "Syntax error on "else", delete this token." I don't use the compareTo method as the teacher recommended, either.
[code]
ackage alphabetical;
import java.util.*;
public class Alphabetical
{
static boolean precedes (Scanner scan)
{
int s1, s2, s3;
int firstAlphabetical = 0;
if (s1 > s2)
else if (s1 > s3){
firstAlphabetical = s1;}
else if (s3 > s1){
firstAlphabetical = s3;}
if (s2 > s1)
else if (s2 > s3){
firstAlphabetical = s2;}
else if (s3 > s2){
firstAlphabetical = s3;}
}
public static void main(String[] args)
{
Scanner sc = new Scanner (System.in);
int firstAlphabetical = 0;
double s1, s2, s3;
//user input
System.out.print("Enter name 1:");
s1 = sc.nextDouble();
System.out.print("enter name 2: ");
s2= sc.nextDouble();
System.out.print("enter name 3: ");
s3= sc.nextDouble();
//answer
System.out.println("First alphabetically: " + firstAlphabetical);
}
}
lee1210
Aug 25, 2008, 09:23 PM
Here is what I tried. I get two errors that say, "Syntax error on "else", delete this token." I don't use the compareTo method as the teacher recommended, either.
[code]
ackage alphabetical;
import java.util.*;
public class Alphabetical
{
static boolean precedes (Scanner scan)
{
int s1, s2, s3;
int firstAlphabetical = 0;
if (s1 > s2)
else if (s1 > s3){
firstAlphabetical = s1;}
else if (s3 > s1){
firstAlphabetical = s3;}
if (s2 > s1)
else if (s2 > s3){
firstAlphabetical = s2;}
else if (s3 > s2){
firstAlphabetical = s3;}
}
public static void main(String[] args)
{
Scanner sc = new Scanner (System.in);
int firstAlphabetical = 0;
double s1, s2, s3;
//user input
System.out.print("Enter name 1:");
s1 = sc.nextDouble();
System.out.print("enter name 2: ");
s2= sc.nextDouble();
System.out.print("enter name 3: ");
s3= sc.nextDouble();
//answer
System.out.println("First alphabetically: " + firstAlphabetical);
}
}
OK. So you are going to write a precedes function, and you aren't going to use String's compareTo function to accomplish it. This is absolutely fine. Precedes can only tell you information about two things at a time, though. Either x precedes y or y precedes x. So you need to have a function that operates on two things, and returns a boolean.
You cannot use < and > with strings, as this will be comparing their memory locations. This has no relevance in terms of their alphabetical or lexicographical order. you started getting towards an implementation of precedes before, but were still a little off. You can use charAt to compare individual characters of a string. You have to be careful about how many characters you compare, though. You need to make sure you don't go past the end of the shorter string. If you find that two strings are identical to the length of the shortest, you can say that the shorter precedes the longer at that point. Also note, you are being asked to compare alphabetically rather than lexicographically. This is important because B is less than a lexicographically, but not alphabetically (case matters lexicographically).
Once you have your precedes function properly comparing two strings and returning whether the first precedes the second alphabetically, it gets pretty simple. In pseudocode:
lowest = a
if precedes(b,lowest)
lowest=b
if precedes(c,lowest)
lowest=c
At the end, lowest will be the first alphabetically.
-Lee
soccersquirt82
Aug 25, 2008, 09:34 PM
I tried using precedes, but making if then statements aren't working too well. This is what I've got.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
static boolean precedes (Scanner scan)
{
string s1, s2, s3;
if (s1.precedes(s2))
return true;
else;
return false;
if (s1.precedes(s3))
return true;
else;
return false;
if (s2.precedes(s3))
return true;
else;
return false;
}
public static void main(String[] args)
{
Scanner sc = new Scanner (System.in);
int firstAlphabetical = 0;
double s1, s2, s3;
//user input
System.out.print("Enter name 1:");
s1 = sc.nextDouble();
System.out.print("enter name 2: ");
s2= sc.nextDouble();
System.out.print("enter name 3: ");
s3= sc.nextDouble();
//answer
System.out.println("First alphabetically: " + firstAlphabetical);
}
}
lee1210
Aug 25, 2008, 09:50 PM
I tried using precedes, but making if then statements aren't working too well. This is what I've got.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
static boolean precedes (Scanner scan)
{
string s1, s2, s3;
if (s1.precedes(s2))
return true;
else;
return false;
if (s1.precedes(s3))
return true;
else;
return false;
if (s2.precedes(s3))
return true;
else;
return false;
}
public static void main(String[] args)
{
Scanner sc = new Scanner (System.in);
int firstAlphabetical = 0;
double s1, s2, s3;
//user input
System.out.print("Enter name 1:");
s1 = sc.nextDouble();
System.out.print("enter name 2: ");
s2= sc.nextDouble();
System.out.print("enter name 3: ");
s3= sc.nextDouble();
//answer
System.out.println("First alphabetically: " + firstAlphabetical);
}
}
Precedes needs to take 2 string values as its arguments. s1 in main is not at all the same as s1 in precedes. They are in a different scope. You need to pass s1 and s2 (for example) as arguments to precedes, and return true if s1 is alphabetically less than s2, and false otherwise. The syntax of if-else can be found here:
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/if.html
You need to get some {}s going to put your conditional statements in, and there are no ;s needed.
-Lee
soccersquirt82
Aug 25, 2008, 10:04 PM
I''m still not understanding the if-then statements.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
static boolean precedes (String s1, s2, s3)
{
if (s1.precedes(s2))
return true
else
return false
if (s1.precedes(s3))
return true
else
return false
if (s2.precedes(s3))
return true
else
return false
}
public static void main (Scanner scan)
{
Scanner sc = new Scanner (System.in);
int firstAlphabetical = 0;
//user input
System.out.print("Enter name 1:");
String s1 = sc.nextLine();
System.out.print("enter name 2: ");
String s2= sc.nextLine();
System.out.print("enter name 3: ");
String s3= sc.nextLine();
//answer
System.out.println("First alphabetically: " + firstAlphabetical);
}
}
lee1210
Aug 25, 2008, 10:12 PM
I''m still not understanding the if-then statements.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
static boolean precedes (String s1, s2, s3)
{
if (s1.precedes(s2))
return true
else
return false
if (s1.precedes(s3))
return true
else
return false
if (s2.precedes(s3))
return true
else
return false
}
public static void main (Scanner scan)
{
Scanner sc = new Scanner (System.in);
int firstAlphabetical = 0;
//user input
System.out.print("Enter name 1:");
String s1 = sc.nextLine();
System.out.print("enter name 2: ");
String s2= sc.nextLine();
System.out.print("enter name 3: ");
String s3= sc.nextLine();
//answer
System.out.println("First alphabetically: " + firstAlphabetical);
}
}
First, let's get the logic right.
In main you will read 3 strings.
You will keep track of the one that is the lowest, assuming it to be the first one.
You will use precedes to compare the current lowest with the second. You will set the lowest to the second, if so.
You will use precedes to compare the current lowest with the third. You will set the lowest to the third, if so.
You will print the lowest.
In precedes you will take EXACTLY TWO strings as arguments. We will call them stringA and stringB.
You will set stringA to the uppercase version of stringA.
You will set stringB to the uppercase version of stringB.
You will get the length of stringA, and compare it to the length of stringB. You will check each character in A and B to the length of the shortest of the two, as found in the previous step.
If you find that a character is less from one string than in the other, you can return true or false immediately. Return true if stringA was less, return false if stringB was less.
If the strings are equal up to the length of the shorter of the two, the shorter is precedes the other, return true or false respectively.
Right now you are calling precedes inside itself, this will not work.
An if-then-else statement looks like:
if(true) {
System.out.println("True is true");
} else {
System.out.println("This is impossible. True is false.");
}
-Lee
soccersquirt82
Aug 25, 2008, 10:26 PM
This seems right to me, but I have six errors. Two say to delete the "else" and the other two say to add ";" in the if-then statement.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
static boolean precedes (String s1, s2, s3)
{
lowest = 0;
if (s1.precedes(s2)){
lowest = s1}
return true;
else {
lowest = s2;}
return false;
if (lowest.precedes(s3)){
lowest = lowest}
return true;
else {
lowest = s3;}
return false;
}
public static void main (Scanner scan)
{
Scanner sc = new Scanner (System.in);
//user input
System.out.print("Enter name 1:");
String s1 = sc.nextLine();
System.out.print("enter name 2: ");
String s2= sc.nextLine();
System.out.print("enter name 3: ");
String s3= sc.nextLine();
//answers
System.out.println("The string that comes first alphabetically is: " + precedes(lowest));
}
}
lee1210
Aug 25, 2008, 10:38 PM
This seems right to me, but I have six errors. Two say to delete the "else" and the other two say to add ";" in the if-then statement.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
static boolean precedes (String s1, s2, s3)
{
lowest = 0;
if (s1.precedes(s2)){
lowest = s1}
return true;
else {
lowest = s2;}
return false;
if (lowest.precedes(s3)){
lowest = lowest}
return true;
else {
lowest = s3;}
return false;
}
public static void main (Scanner scan)
{
Scanner sc = new Scanner (System.in);
//user input
System.out.print("Enter name 1:");
String s1 = sc.nextLine();
System.out.print("enter name 2: ");
String s2= sc.nextLine();
System.out.print("enter name 3: ");
String s3= sc.nextLine();
//answers
System.out.println("The string that comes first alphabetically is: " + precedes(lowest));
}
}
Precedes should take EXACTLY TWO string arguments as I stated before. You should call precedes with s1 and s2 first, then whichever of those is lower and s3 next. Precedes needs to compare the TWO strings that are passed to it. It needs to do it with charAt if you are not supposed to use String's compareTo. You will use the result of the two calls to precedes in the conditional of an if.
Look at my last post and change precedes to compare TWO strings, that are passed in. String does not have a precedes method, you have to decide this yourself in your precedes method. You most perform a for loop from 0 to one less than the length of the shorter string.
-Lee
Edit: Also, you must state the type of EACH of the arguments of precedes. Call them something other than s1 and s2, since that's what you have things called in main. so, say:
boolean precedes(String stringA, String stringB) {
...
}
soccersquirt82
Aug 25, 2008, 11:05 PM
I AM supposed to use the compareTo method. . .
lee1210
Aug 25, 2008, 11:10 PM
I AM supposed to use the compareTo method. . .
Sweet, that saves you time and effort in your precedes method.
Instead of having to loop, do charAt, etc. you can just do:
StringA.toUppercase().compareTo(StringB.toUppercase())
or
StringA.compareToIgnoreCase(StringB)
Assign the result of that thing to an int, and compare it to 0 based on the returns detailed here:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#compareTo(java.lang.String)
Based on the result you'll return true or false.
-Lee
soccersquirt82
Aug 25, 2008, 11:19 PM
I tried switching everything from String to int, and I tried using the compareTo method.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
static boolean precedes (int sA, int sB, int sC)
{
int lowest;
if (sA.compareToIgnoreCase(sB){
lowest = sA}
return true;
else {
lowest = sB;}
return false;
if (lowest.compareToIgnorecase(sC)){
lowest = lowest}
return true;
else {
lowest = sC;}
return false;
}
public static void main (Scanner scan)
{
Scanner sc = new Scanner (System.in);
int lowest = 0;
//user input
System.out.print("Enter name 1:");
int s1 = sc.nextInt();
System.out.print("enter name 2: ");
int s2= sc.nextInt();
System.out.print("enter name 3: ");
int s3= sc.nextInt();
//answers
System.out.println("The string that comes first alphabetically is: " + precedes(lowest));
}
}
lee1210
Aug 25, 2008, 11:24 PM
I tried switching everything from String to int, and I tried using the compareTo method.
[code]
package alphabetical;
import java.util.*;
public class Alphabetical
{
static boolean precedes (int sA, int sB, int sC)
{
int lowest;
if (sA.compareToIgnoreCase(sB){
lowest = sA}
return true;
else {
lowest = sB;}
return false;
if (lowest.compareToIgnorecase(sC)){
lowest = lowest}
return true;
else {
lowest = sC;}
return false;
}
public static void main (Scanner scan)
{
Scanner sc = new Scanner (System.in);
int lowest = 0;
//user input
System.out.print("Enter name 1:");
int s1 = sc.nextInt();
System.out.print("enter name 2: ");
int s2= sc.nextInt();
System.out.print("enter name 3: ");
int s3= sc.nextInt();
//answers
System.out.println("The string that comes first alphabetically is: " + precedes(lowest));
}
}
That doesn't make sense. Leave them as strings. Your input in main is fine. Declare lowest as a String, not an int. Assign s1 to lowest. Call precedes after your input in main as:
if(precedes(s2,lowest)) {
//If s2 precedes lowest, do what?
}
After that, you will repeat with s3 and lowest.
Change the definition of precedes to what I suggested. It must take exactly TWO strings, not 3 strings, not 3 ints, TWO strings. In precedes, compare the two strings passed in (TWO STRINGS!) using compareToIgnoreCase. You must compare the result of compareToIgnoreCase to 0 to see which is lower.
-Lee
soccersquirt82
Aug 25, 2008, 11:35 PM
I'm not getting it. This will have to wait for tomorrow. . .
lee1210
Aug 25, 2008, 11:43 PM
I'm not getting it. This will have to wait for tomorrow. . .
I wrote this all out with ints instead of strings to demonstrate, but will only post the parts that demonstrate the sticky things so it doesn't give the whole thing away:
int lowest = intA;
if(precedes(intB,lowest)) lowest=intB;
if(precedes(intC,lowest)) lowest=intC;
static boolean precedes(int intOne, int intTwo) {
if(...) { //You'd fill in something that compares intOne and intTwo
return true;
} else {
return false;
}
}
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.