Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am trying to write a program that will determine what breed of dog is right for a person or family. I am programming on a Mac, and I want my program to include a way for people to check boxes of which statements are true about their lifestyles, and then a way to search a data table I've made and tally up the amount of categories the person has in common with each breed of dog, and then display the result. I've spent a lot of time googling things and trying things but nothing seems to work for me. Help?
Posted
Comments
Nelek 25-Mar-12 19:04pm    
Ok, you are trying... what have you tried? where are you getting problems? what have you googled? What do you want to achieve? Your description is very vague.
Member 8759392 25-Mar-12 19:29pm    
I tried using c++ in codeblocks. If I can do this, I would just like to know what kinds of code to use. Thanks.
enhzflep 25-Mar-12 20:34pm    
Well, as a couple of starters, I'd consider looking into WxWidgets for the UI and SQLite as a means of storing the data tables.

Code::Blocks has integrated tools for designing WXWidgets forms, while SQLite is a connectionless database - don't need a database engine installed. CPPSqlite may make it more suitable for your needs.
Albert Holguin 25-Mar-12 21:22pm    
Find a user interface framework that is supported by your Mac OS. You should be able to google for plenty of answers.

1 solution

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:
Java
import java.util.Random;

public class FindYourDogType {
    private static String[] dogTypes =
    {
        "Affenpinscher",
        "Afghan Hound",
        "Aidi",
        //list goes on like this. List found at: 
        //    http://en.wikipedia.org/wiki/List_of_dog_breeds
        "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)];
    }
}
 
Share this answer
 
Comments
Albert Holguin 26-Mar-12 1:22am    
This is too funny! :D
[no name] 26-Mar-12 2:35am    
It needed this. Of course you left out the choice "goldfish" but I have not downvoted for this omission.
krumia 26-Mar-12 2:46am    
:D :D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900