topical media & game development

talk show tell print

professional-php-01-class.Square.php / php



  <?php
    require_once('class.Rectangle.php');
  
    class Square extends Rectangle {
      public function __construct(size) {
        this->height = size;
        this->width = size;
      }
     
      public function getArea() {
        return pow(this->height, 2);
      }
     
    }
  ?>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.