Esempio n. 1
0
    static void Main(string[] args)
    {
        StudentSystem studentSystem = new StudentSystem();

        string input;

        while ((input = Console.ReadLine()) != "Exit")
        {
            var tokents = input.Split()
                          .ToArray();

            string command = tokents[0];

            string name = tokents[1];

            if (command == "Create")
            {
                int    age     = int.Parse(tokents[2]);
                double grade   = double.Parse(tokents[3]);
                string comment = GetComment(grade);
                studentSystem.AddStudent(name, age, grade, comment);
            }
            else if (command == "Show")
            {
                studentSystem.ShowStudent(name);
            }
        }
    }