Prechádzať zdrojové kódy

inheritance classes of geometric shapes

bufon2211 6 rokov pred
rodič
commit
74563e9e61
1 zmenil súbory, kde vykonal 34 pridanie a 0 odobranie
  1. 34 0
      Segment.php

+ 34 - 0
Segment.php

@@ -0,0 +1,34 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: mrs
+ * Date: 28.12.2017
+ * Time: 13:46
+ */
+require_once('AbstractCoordinates.php');
+require_once('InterfaceSegmentLength.php');
+
+
+class Segment extends Coordinates implements SegmentLength
+{
+    public $segmentName;
+    public $points;
+    public $coordinatesPoints;
+    public $segmentLength;
+
+    public function __construct(Point $point1, Point $point2)
+    {
+        $this->points = [$point1, $point2];
+
+    }
+
+    public function getCoordinates(): array
+    {
+
+    }
+
+    public function getSegmentLength(): float
+    {
+
+    }
+}