public void Contains() { Rect rec = new Rect(new Point(), new Point(3, 5)); //Assert.AreEquals point within the Rect Assert.AreEqual(rec.contains(new Point(1, 1)), true); //Assert.AreEquals point outside of the Rect Assert.AreEqual(rec.contains(new Point(10, 10)), false); }
static void Main(string[] args) { Rectangle r1; r1 = new Rectangle(1, 1, 1, 1); r1.show(); r1.lengths(2); r1.widths(2); r1.postion(2, 2); r1.show(); r1.area(); r1.perimeter(); r1.contains(); Console.WriteLine(r1.ToString()); }