This is my first OOP PHP library and wanted to get advice on how I can improve what I wrote. This is what I needed to do:I'm also not sure on what it meant by proportionally resize the shape up or down, given a floating-point scale factor I think what I did what it meant but I could be wrong.Build a simple PHP library for defining 2-dimensional geometric shapes and making basic calculations with them.For each shape, the library should be able to do the following:calculate the areacalculate the perimeterproportionally resize the shape up or down, given a floating-point scale factor<?PHPecho Circle <br/>;$circle = new circle(5);$circle->getArea();$circle->getPerimiter();$circle->scale(up, .5);$circle->getArea();$circle->getPerimiter();echo <br/>Right Triangle <br/>;$rt = new RightTriangle(4, 5);$rt->getArea();$rt->getPerimiter();$rt->scale(up, .5);$rt->getArea();$rt->getPerimiter();class Circle {    public function __construct( $radius )    {        $this->radius = $radius;    }    public function getArea()    {        echo pow($this->radius, 2) * M_PI.<br/>;    }    public function getPerimiter()    {        echo 2 * M_PI * $this->radius.<br/>;    }    public function scale($direction, $scale)    {        if($direction == 'up')        {            $this->radius = $this->radius + ($this->radius * $scale);        }        else        {            $this->radius = $this->radius - ($this->radius * $scale);        }    }}class RightTriangle {    public function __construct( $a, $b )    {        $this->a = $a;        $this->b = $b;    }    public function getArea()    {        echo ($this->a*$this->b/2).<br/>;    }    public function getPerimiter()    {        echo $this->a + $this->b + sqrt(pow($this->a, 2) + pow($this->b, 2)).<br/>;    }    public function scale($direction, $scale)    {        if($direction == 'up')        {            $this->a = $this->a + ($this->a * $scale);            $this->b = $this->b + ($this->b * $scale);        }        else        {            $this->a = $this->a - ($this->a * $scale);            $this->b = $this->b + ($this->b * $scale);        }    }}?>
My library for 2 dimensional shapes
php;object oriented;library