Rectangle.php 756 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: mrs
  5. * Date: 28.12.2017
  6. * Time: 13:17
  7. */
  8. require_once('AbstractPolygon.php');
  9. class Rectangle extends Polygon
  10. {
  11. public $points;
  12. public $lines;
  13. public $segmentLength;
  14. public $perimeter;
  15. public $area;
  16. public function __construct(Point $point1, Point $point2, Point $point3, Point $point4)
  17. {
  18. $this->points = [$point1, $point2, $point3, $point4];
  19. }
  20. public function getCoordinates(): array
  21. {
  22. }
  23. public function getLines(): array
  24. {
  25. }
  26. public function getSegmentLength(): float
  27. {
  28. }
  29. public function getPerimeter(): float
  30. {
  31. }
  32. public function getArea(): float
  33. {
  34. }
  35. }