|
@@ -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
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|