Files
OOP/Figures/Rectangle.cs
2025-08-18 10:24:52 +02:00

24 lines
509 B
C#

namespace OOP.Figures
{
public class Rectangle : Shape
{
public Rectangle(double width, double height)
{
this.height = height;
this.width = width;
}
public double height { get; set; }
public double width { get; set; }
public override double GetArea()
{
return height * width;
}
public override double GetPerimeter()
{
return (height * 2) + (width * 2);
}
}
}