Example #1
0
        static void Main(string[] args)
        {
            Abiturient EmptyAbit = new Abiturient();

            Console.WriteLine(EmptyAbit.GetInfo());

            Abiturient abit = new Abiturient("Виталий", "Кличко", new DateTime(2000, 10, 10), 153, 11, "Школа №5");

            Console.WriteLine(abit.GetInfo());

            Abiturient CopyAbit = new Abiturient(abit);

            Console.WriteLine(CopyAbit.GetInfo());

            Abiturient NotFullAbit = new Abiturient("Виталий", "Кличко", 153, "Школа №5");

            Console.WriteLine(NotFullAbit.GetInfo());
            Console.WriteLine("\n");


            Student EmptyStud = new Student();

            Console.WriteLine(EmptyStud.GetInfo());
            Student Stud = new Student("Валентин", "Дорн", new DateTime(1995, 12, 27), 1, 1, "ФІКТ", "ЖДТУ");

            Console.WriteLine(Stud.GetInfo());
            Student CopyStud = new Student(Stud);

            Console.WriteLine(CopyStud.GetInfo());
            Student NotFullStud = new Student("Валентин", "Дорн", 1, 1, "ЖДТУ");

            Console.WriteLine(NotFullStud.GetInfo());
            Console.WriteLine("\n");


            Teacher EmptyTeach = new Teacher();

            Console.WriteLine(EmptyTeach.GetInfo());
            Teacher Teach = new Teacher("АННА", "Иванова", new DateTime(1985, 2, 7), "Декан", "ФІКТ", "ЖДТУ");

            Console.WriteLine(Teach.GetInfo());
            Teacher CopyTeach = new Teacher(Teach);

            Console.WriteLine(CopyTeach.GetInfo());
            Teacher NotFullTeach = new Teacher("Анна", "Иванова", "Декан", "ЖДТУ");

            Console.WriteLine(NotFullTeach.GetInfo());
            Console.WriteLine("\n");


            LibraryUser EmptyLib = new LibraryUser();

            Console.WriteLine(EmptyLib.GetInfo());
            LibraryUser Lib = new LibraryUser("Владислав", "Борисов", new DateTime(2003, 7, 14), 00125678, new DateTime(2019, 10, 24), 75);

            Console.WriteLine(Lib.GetInfo());
            LibraryUser CopyLib = new LibraryUser(Lib);

            Console.WriteLine(CopyLib.GetInfo());
            LibraryUser NotFullLib = new LibraryUser("Владислав", "Борисов", 09976443, new DateTime(2019, 3, 27));

            Console.WriteLine(NotFullLib.GetInfo());
            Console.WriteLine("\n");
        }
Example #2
0
 public LibraryUser(LibraryUser previousUser)
 {
     Number  = previousUser.Number;
     Date    = previousUser.Date;
     Payment = previousUser.Payment;
 }