View sourcecode

The following files exists in this folder. Click to view.

CSuperHuman.php

1 lines ASCII Unix (LF)
1
<?php
/**
 * For superhumans.
 */
class CSuperHuman extends CHuman {


    /**
     * Properties
     */
    private $ability;


    /**
     * Constructor
     */
    public function __construct($name, $age, $profession, $ability) {
        //parent::__construct($name, $age, $profession);

        $this->ability = $ability;
    }


    /**
     * Print out the superhuman.
     */
    public function about() {
        return "<p>I'm a Superhuman. " . $this->description() . " I can $this->ability.</p>";
    }
}