string Name { get; set; }
string Color{ get; set; }
public class Triangle: IShape, IColor
public string Color { get; set; }
public double Base { get; set; }
public double Height { get; set; }
public Triangle(string n, double b, double h, string c)
public double CalculateArea()
return ((Base * Height)/2);
if (Color.ToLower() == "yellow")
public static void Main()
Triangle TriangleObject = new Triangle("Triangle", 8.5, 4.2, "blue");
Console.WriteLine("The area for the created triangle is: "+ TriangleObject.CalculateArea());
Console.WriteLine("True/False; The triangle's color is yellow: "+ TriangleObject.IsYellow());