static void Main() { EqTriangle b = new EqTriangle(34, "Triangle", "blue"); IsTriangle c = new IsTriangle(34, 45, "IsTriangle", "Red"); RectTriangle d = new RectTriangle(3, 4, "Trinagle", "red"); Painter.Draw(b); Painter.Draw(c); Painter.Draw(d); }
public void Delete_Triangle(RectTriangle t) { if (Triangles.Count == 0) { Console.WriteLine("List is empty !"); return; } Triangles.Remove(t); }
static public void Draw(RectTriangle t) { int h = 8; int i, j; for (i = 1; i <= h; i++) { for (j = 1; j <= i; j++) { Console.Write("* "); } Console.WriteLine(); } }
public void addTriangle(RectTriangle q) { Triangles.Add(q); }