﻿// register the AjaxTutorial namespace
Type.registerNamespace("AjaxTutorial");
    
// define the Instructor class
AjaxTutorial.Instructor = function(name) 
{
  // initialize base class
  AjaxTutorial.Instructor.initializeBase(this, [name]);

  // notify instructor creation
  Sys.Debug.trace("Instructor created: " + name);
}  

// define Instructor instance members
AjaxTutorial.Instructor.prototype = 
{
  // method of ISelfDescribingObject interface
  describeYourself: function()
  {
    Sys.Debug.trace("Good morning class. My name is " + 
      this._name + " and I'm your instructor.");
  },

  // method of IEmployeeInterface
  startWorking : function()
  {
    Sys.Debug.trace("Going to my dear students.");
  },

  // method specific to Instructor
  teach: function()
  {
    Sys.Debug.trace("Instructor bubbles incomprehensibly");
  }
}
    
// register the Instructor class
AjaxTutorial.Instructor.registerClass("AjaxTutorial.Instructor",
  AjaxTutorial.Person, AjaxTutorial.ISelfDescribingObject,
  AjaxTutorial.IEmployee);
