Quote:
I am trying to write a program that will determine what breed of dog is right for a person or family.
Now I have some great experience on this field. I recently tried to purchase a puppy and the pet show owner tried to help me to get the right kind of the puppy form me. What he was doing was something like this:
import java.util.Random;
public class FindYourDogType {
private static String[] dogTypes =
{
"Affenpinscher",
"Afghan Hound",
"Aidi",
"Yorkshire Terrier"
};
private static Random random = new Random();
public static void main(String[] args) {
System.out.println("Your dog type is: " + getDogType());
}
private static String getDogType() {
return dogTypes[(random.nextInt() % dogTypes.length)];
}
}