<?php
class Point
{
public $x;
public $y;
function __construct($x, $y)
{
$this->x = $x;
$this->y = $y;
}
function distance(Point $point)
{
return sqrt(pow($this-> x - $point-> x,2 )+pow( $this-> y - $point-> y, 2));
}
}
class Trapezoid
{
public $AB;
public $BC;
public $CD;
public $DA;
public $h;
public $perimetr;
public $s;
//
public function __construct($x1, $y1, $x2, $y2, $x3, $y3, $x4, $y4)
{
$A = new Point($x1, $y1);