Beispiel #1
0
        public double getPerimeter(ShapeF s)
        {
            var width = s.getWidth();

            return(3 * width);
        }
Beispiel #2
0
        public double getArea(ShapeF s)
        {
            var width = s.getWidth();

            return((Math.Sqrt(3) / 4) * width * width);
        }
Beispiel #3
0
 public double getPerimeter(ShapeF s)
 {
     return(Math.PI * s.getWidth());
 }
Beispiel #4
0
 public double getArea(ShapeF s)
 {
     return(Math.PI * (s.getWidth() / 2) * (s.getWidth() / 2));
 }
Beispiel #5
0
        public double getArea(ShapeF s)
        {
            var w = s.getWidth();

            return(w * w);
        }
Beispiel #6
0
 public void addShape(ShapeF s)
 {
     shapes.Add(s);
 }