Exemplo n.º 1
0
        internal static void BoSungBaiViet(string noidung, List <string> tukhoa)
        {
            Tin tinMoi = TaoTinMoi(noidung, tukhoa);

            BaiVietMoi.Add(tinMoi);
            ThongBaoSV(tinMoi);
        }
Exemplo n.º 2
0
 private static void ThongBaoSV(Tin tinMoi)
 {
     foreach (SinhVien sv in dssv)
     {
         if (CanThongBao(sv, tinMoi))
         {
             sv.CoTinMoi(tinMoi);
         }
     }
 }
        internal static void BoSungBaiViet(string noidung, List <string> tukhoa, int uuTien)
        {
            Tin tinMoi = TaoTinMoi(noidung, tukhoa);

            BaiVietMoi[uuTien - 1].Add(tinMoi);
            if (uuTien == 1)
            {
                ThongBaoSV(tinMoi);
            }
        }
 public override bool IsAppropriate(SinhVien student, Tin news)
 {
     foreach (string kw in news.TuKhoa)
     {
         if (student.TuKhoa.Contains(kw))
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 5
0
        private static Tin TaoTinMoi(string noidung, List <string> tukhoa)
        {
            Tin tin = new Tin(noidung, tukhoa);

            return(tin);
        }
Exemplo n.º 6
0
 private static bool CanThongBao(SinhVien sv, Tin tinMoi)
 {
     return(true);
 }
Exemplo n.º 7
0
 internal void CoTinMoi(Tin tinMoi)
 {
     Console.WriteLine("Sinh vien " + HoTen + " (MSSV: " + MSSV + ") da doc tin " + tinMoi.NoiDung);
 }
 private static bool CanThongBao(SinhVien sv, Tin tinMoi)
 {
     return(NewsRecommenderSystem.IsAppropriate(sv, tinMoi));
 }
 public override bool IsAppropriate(SinhVien student, Tin news)
 {
     return(true);
 }
 //new DummyHelper();
 internal static bool IsAppropriate(SinhVien sv, Tin tinMoi)
 {
     return(helper.IsAppropriate(sv, tinMoi));
 }