Exemplo n.º 1
0
 public override void NhapHinh(string ghiChu)
 {
     base.NhapHinh(ghiChu);
     this.I = new DIEM();
     this.I.NhapDiem("Nhap tam I: ");
     Console.WriteLine("Nhap ban kinh r: ");
     this.R = double.Parse(Console.ReadLine());
 }
Exemplo n.º 2
0
 //thanh phan xu ly
 public void NhapTamGiac(string ghiChu)
 {
     Console.WriteLine(ghiChu);
     this.A = new DIEM();
     this.B = new DIEM();
     this.C = new DIEM();
     this.A.NhapDiem("Nhap dinh A:");
     this.B.NhapDiem("Nhap dinh B:");
     this.C.NhapDiem("Nhap dinh C:");
 }
Exemplo n.º 3
0
 public override void NhapHinh(string ghiChu)
 {
     base.NhapHinh(ghiChu);
     this.A = new DIEM();
     this.A.NhapDiem("Nhap dinh A: ");
     Console.WriteLine("Nhap chieu dai: ");
     this.d = double.Parse(Console.ReadLine());
     Console.WriteLine("Nhap chieu rong: ");
     this.r = double.Parse(Console.ReadLine());
 }
Exemplo n.º 4
0
        public void NhapDaGiac(string ghiChu)
        {
            Console.WriteLine(ghiChu);
            Console.WriteLine("Nhap so dinh: ");
            int N = int.Parse(Console.ReadLine());

            this.dsDinh = new List <DIEM>();
            for (int i = 0; i < N; i++)
            {
                DIEM a = new DIEM();
                a.NhapDiem($"Nhap dinh A[{i}]");
                dsDinh.Add(a);
            }
        }
Exemplo n.º 5
0
 public double TinhKhoangCachDiem(DIEM b)
 {
     return(Math.Sqrt((X - b.X) * (X - b.X) + (Y - b.Y) * (Y - b.Y)));
 }