コード例 #1
0
ファイル: Form1.cs プロジェクト: HugzFnr/S9-RTU-ID3-form
        private void Form1_Load(object sender, EventArgs e)
        {
            set1 = new SetOfQuestions(new string[10] {
                "How is the weather?", "How was the weather yesterday?",
                "How is the temperature ?", "How do you feel today?",
                "Which season is it ?", "How is the humidity ?", "What’s the plant type?", "What’s the lifetime of the plant?",
                "How are the plants looking ? ", "Shall I go watering my plants today ?"
            },
                                      new string[10] {
                "Today weather", "Yesterday weather",
                "Temperature", "Tiredness",
                "Season", "Humidity", "Plant type", "Lifetime"
                , "Plant looking", "Ffinal answer"
            },
                                      new List <string>[10] {
                new List <string> {
                    "RAINY", "SUNNY", "CLOUDY"
                },
                new List <string> {
                    "RAINY2", "SUNNY2", "CLOUDY2"
                }, new List <string> {
                    "COLD", "WARM", "HOT"
                },
                new List <string> {
                    "EXHAUSTED", "TIRED", "GOOD", "GREAT"
                }, new List <string> {
                    "SPRING", "SUMMER", "AUTUMN", "WINTER"
                },
                new List <string> {
                    "LOW", "AVERAGE", "HIGH"
                }, new List <string>(), new List <string> {
                    "SHORT", "LONG"
                }, new List <string>(),
                new List <string> {
                    "YES", "NO"
                }
            });

            InitDataTable();

            r = new Random();

            answers = new List <Answer>();
            currentQuestionIndex = 0;
            inputs        = new string[10];
            usedQuestions = new List <int>();

            RefreshQuestion();
        }
コード例 #2
0
ファイル: Answer.cs プロジェクト: HugzFnr/S9-RTU-ID3-form
 //constructor with 11 parameters (
 public Answer(SetOfQuestions givenSet, string[] inputs)
 {
     entries = inputs;
     set     = givenSet;
 }