Exemple #1
0
        public override void Nhap()
        {
            VIDOUtils ulti = new VIDOUtils();

            base.ToString();
            Console.WriteLine("Khoi A");
            Toan = ulti.ReadNumber("Nhap diem toan: ", 0, 10);
            Ly   = ulti.ReadNumber("Nhap diem ly: ", 0, 10);
            Hoa  = ulti.ReadNumber("Nha diem hoa: ", 0, 10);

            TongDiem = Toan + Ly + Hoa;
        }
Exemple #2
0
        public override void Nhap()
        {
            VIDOUtils ulti = new VIDOUtils();

            base.ToString();
            Console.WriteLine("Khoi C");
            Van = ulti.ReadNumber("Nhap diem van: ", 0, 10);
            Su  = ulti.ReadNumber("Nhap diem su: ", 0, 10);
            Dia = ulti.ReadNumber("Nhap diem dia: ", 0, 10);

            TongDiem = Van + Su + Dia;
        }
Exemple #3
0
        public override void Nhap()
        {
            VIDOUtils ulti = new VIDOUtils();

            base.ToString();
            Console.WriteLine("Khoi D");
            Toan = ulti.ReadNumber("Nhap diem toan: ", 0, 10);
            Van  = ulti.ReadNumber("Nhap diem van: ", 0, 10);
            Anh  = ulti.ReadNumber("Nhap diem anh: ", 0, 10);

            TongDiem = Toan + Van + Anh;
        }
Exemple #4
0
        public static void Main(string[] args)
        {
            VIDOUtils    ulti          = new VIDOUtils();
            List <QLTS>  listThiSinh   = new List <QLTS>();
            List <QLTS>  listThiSinhKA = new List <QLTS>();
            List <QLTS>  listThiSinhKC = new List <QLTS>();
            List <QLTS>  listThiSinhKD = new List <QLTS>();
            QLTS         ts;
            StudentKhoiA a;
            StudentKhoiB c;
            StudentKhoiD d;

            ts = new QLTS();
            ts.Nhap();
            a = new StudentKhoiA();
            a.Nhap();
            c = new StudentKhoiB();
            c.Nhap();
            d = new StudentKhoiD();
            d.Nhap();

            Console.WriteLine(ts.ToString());
            Console.WriteLine(a.ToString());
            Console.WriteLine(c.ToString());
            Console.WriteLine(d.ToString());

            listThiSinhKA.Clear();
            listThiSinhKC.Clear();
            listThiSinhKD.Clear();
            foreach (var element in listThiSinh)
            {
                if (element is StudentKhoiA)
                {
                    listThiSinhKA.Add(element);
                }
                else if (element is StudentKhoiB)
                {
                    listThiSinhKC.Add(element);
                }
                else if (element is StudentKhoiD)
                {
                    listThiSinhKD.Add(element);
                }
            }

            foreach (var element in ulti.Top(listThiSinhKA, 2))
            {
                Console.WriteLine(element.ToString());
            }
            foreach (var element in ulti.Top(listThiSinhKC, 2))
            {
                Console.WriteLine(element.ToString());
            }
            foreach (var element in ulti.Top(listThiSinhKD, 2))
            {
                Console.WriteLine(element.ToString());
            }



            // TODO: Implement Functionality Here

            Console.Write("Press any key to continue . . . ");
            Console.ReadKey(true);
        }