Beispiel #1
0
        static void Main(string[] args)
        {
            Student F = new Student("Dio", "18ZX1234567");

            Console.WriteLine(F.GetName() + " " + F.GetId());
            F.Increment();
            Console.WriteLine(F.GetYear());
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Student F = new Student("Yerzhan", "18BD141312");

            Console.WriteLine(F.GetName() + " " + F.GetId());
            F.Increment();
            Console.WriteLine(F.GetYear());
            Console.ReadKey();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Student student1 = new Student();

            Console.WriteLine(student1.GetName());
            Console.WriteLine(student1.GetID());
            Console.WriteLine(student1.GetYear());
            Console.ReadKey();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Student Info = new Student(Console.ReadLine(), Console.ReadLine());

            //считваем с кансоли данные

            for (int i = 0; i < 4; i++)
            //создаем цикл, который будет повторяться 4 раза(4 года обучения)
            {
                Console.WriteLine(Info.GetName()); //вызываем функцию, которая будет возварщать имя


                Console.WriteLine(Info.GetId());
                //вызываем функцию, которая будет возвращать айди

                Console.WriteLine(Info.GetYear());//вызываем функцию, которая будет возваращать увеличенный год обучения
            }
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            //считваем с кансоли данные
            Student Info = new Student("Nazerke", "18BD111074");

            //создаем цикл, который будет повторяться 4 раза(4 года обучения)
            for (int i = 0; i < 4; i++)
            {
                //вызываем функцию, которая будет возвращать имя
                Console.WriteLine(Info.GetName());

                //вызываем функцию, которая будет возвращать айди
                Console.WriteLine(Info.GetId());

                //вызываем функцию, которая будет возвраащать увеличенный год обучения
                Console.WriteLine(Info.GetYear());
            }
        }
Beispiel #6
0
        static void Main(string[] args)
        {
            //read data from the console
            Student Info = new Student(Console.ReadLine(), Console.ReadLine());

            //create a loop that will be repeated 4 times (4 years of study)
            for (int i = 0; i < 4; i++)
            {
                //call the function that returns the name
                Console.WriteLine(Info.GetName());

                //call the function that returns the id
                Console.WriteLine(Info.GetId());

                //call the function that returns the increased study year
                Console.WriteLine(Info.GetYear());
            }
            Console.ReadKey(true);
        }