コード例 #1
0
        public object InvokeChangeMood(string mood)
        {
            MoodAnalyser moodObject   = new MoodAnalyser("happy");
            object       invokeObject = moodObject.AnalyseMood();

            return(invokeObject);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to mood analyzer portal!");
            Console.WriteLine("Type how you feeling right now:");
            string       mood         = Console.ReadLine();
            MoodAnalyser moodAnalyser = new MoodAnalyser(mood);

            Console.WriteLine("Currently you are : " + moodAnalyser.AnalyseMood());
        }
コード例 #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Enter message: ");
            string       message   = Console.ReadLine();
            MoodAnalyser checkmood = new MoodAnalyser(message);
            string       result    = checkmood.AnalyseMood();

            Console.WriteLine(result + " MOOD");
            MoodAnalyserFactory.CreateMoodAnalyserObject("MoodAnalyzerProblem.MoodAnalyser", "MoodAnalyser");
        }