Exemple #1
0
        public override void NhapThongTin()
        {
            VIDOUtils utils = new VIDOUtils();

            base.NhapThongTin();
            DiemVan  = utils.ReadNumber("Nhap Diem Van:", 0, 10);
            DiemSu   = utils.ReadNumber("Nhap Diem Su:", 0, 10);
            DiemDia  = utils.ReadNumber("Nhap Diem Dia:", 0, 10);
            TongDiem = DiemDia + DiemSu + DiemVan;
        }
Exemple #2
0
        public override void NhapThongTin()
        {
            VIDOUtils utils = new VIDOUtils();

            base.NhapThongTin();
            DiemToan = utils.ReadNumber("Nhap Diem Toan: ", 0, 10);
            DiemLy   = utils.ReadNumber("Nhap Diem Ly: ", 0, 10);
            DiemHoa  = utils.ReadNumber("Nhap Diem Hoa: ", 0, 10);
            TongDiem = DiemToan + DiemLy + DiemHoa;
        }
Exemple #3
0
        public override void NhapThongTin()
        {
            VIDOUtils utils = new VIDOUtils();

            base.NhapThongTin();
            DiemToan = utils.ReadNumber("Nhap Diem Toan: ", 0, 10);
            DiemVan  = utils.ReadNumber("Nhap Diem Van: ", 0, 10);
            DiemAnh  = utils.ReadNumber("Nhap Diem Anh: ", 0, 10);

            TongDiem = DiemToan + DiemVan + DiemAnh;
        }
Exemple #4
0
        public static void Main(string[] args)
        {
            VIDOUtils utils = new VIDOUtils();
            //Console.WriteLine("Hello World!");

            // TODO: Implement Functionality Here

            List <ThiSinh> listThiSinh = new List <ThiSinh>();
            ThiSinh        ts;
            List <string>  s = new List <string>();
            int            index, i;

            s.Add("1. Nhap Thi Sinh Khoi A");
            s.Add("2. Nhap Thi Sinh Khoi C");
            s.Add("3. Nhap Thi Sinh Khoi D");
            s.Add("4. Danh Sach Thi Sinh");
            s.Add("5. Danh Sach Thi Sinh Cao Diem");
            s.Add("6. Thoat");
            do
            {
                index = utils.DisplayMenu(s);
                switch (index)
                {
                case 0:
                    ts = new ThiSinhKA();
                    ts.NhapThongTin();
                    listThiSinh.Add(ts);
                    break;

                case 1:
                    ts = new ThiSinhKC();
                    ts.NhapThongTin();
                    listThiSinh.Add(ts);
                    break;

                case 2:
                    ts = new ThiSinhKD();
                    ts.NhapThongTin();
                    listThiSinh.Add(ts);
                    break;

                case 3:
                    foreach (var element in listThiSinh)
                    {
                        Console.WriteLine(element.ToString());
                    }
                    Console.ReadKey(true);
                    break;

                case 4:
                    foreach (var element in utils.Top(listThiSinh, 2))
                    {
                        Console.WriteLine(element.ToString());
                    }
                    Console.ReadKey(true);
                    break;
                }
            }while (index != 5);

//			Animal a, b;
//			Animal c;
//			Animal d;
//			a = new Animal();
//			b = new Animal("Cat");
//			c = new Cat();
//			d = new Duck();
//
//			d.Sleep();
//			d.Move();
//
//			c.Sleep();
//			c.Move();
//
//			Console.WriteLine(a.ToString());
//			Console.WriteLine(b.ToString());
//			Console.WriteLine(c.ToString());
//			a.Move();
//			b.Move();
//			c.Move();
//			((Cat)c).Say();
//			a.Sleep();
//			b.Sleep();
//			c.Sleep();

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