topical media & game development

talk show tell print

professional-php-05-class.course.php / php



  <?php
  class Course {
    private _id;
    private _courseCode;
    private _name;
    
    function __construct(id, courseCode, name) {
      this->_id = id;
      this->_courseCode = courseCode;
      this->_name = name;
    }
    
    public function getName() {
      return this->_name;
    }
    
    public function getID() {
      return this->_id;
    }
  
    public function getCourseCode() {
      return this->_courseCode;
    }
    
    public function __toString() {
      return this->_name;
    }
  }
  ?>
  


(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.