Explorar el Código

inheritance classes of geometric shapes

bufon2211 hace 6 años
padre
commit
ff9b4c8cc3
Se han modificado 1 ficheros con 47 adiciones y 0 borrados
  1. 47 0
      Rectangle.php

+ 47 - 0
Rectangle.php

@@ -0,0 +1,47 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: mrs
+ * Date: 28.12.2017
+ * Time: 13:17
+ */
+require_once('AbstractPolygon.php');
+
+class Rectangle extends Polygon
+{
+    public $points;
+    public $lines;
+    public $segmentLength;
+    public $perimeter;
+    public $area;
+
+    public function __construct(Point $point1, Point $point2, Point $point3, Point $point4)
+    {
+        $this->points = [$point1, $point2, $point3, $point4];
+    }
+
+    public function getCoordinates(): array
+    {
+
+    }
+
+    public function getLines(): array
+    {
+
+    }
+
+    public function getSegmentLength(): float
+    {
+
+    }
+
+    public function getPerimeter(): float
+    {
+
+    }
+
+    public function getArea(): float
+    {
+
+    }
+}