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()); }
//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:"); }
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()); }
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); } }
public double TinhKhoangCachDiem(DIEM b) { return(Math.Sqrt((X - b.X) * (X - b.X) + (Y - b.Y) * (Y - b.Y))); }