var VAL_ENUM = {
"a":1,
"b":2,
"c":4,
"d":8,
"e":16,
"f":32,
"g":64,
"h":128,
"i":256
};

function C() {
  // needed for private methods
  var  self = this;

  var  a_private_var      = VAL_ENUM.a - 0;
       b_global           = VAL_ENUM.b - 0;
  this.c_instance_public  = VAL_ENUM.c - 0;

  // the following two methods have
  // identical access privilages
  var e_private_func_v = function() {
    return VAL_ENUM.e - 0;
  }
  function f_private_func() {
    return VAL_ENUM.f - 0;
  }

  g_global_func = function() {
    return VAL_ENUM.g - 0;
  }
  
  this.h_privilaged_func = function() {
    return VAL_ENUM.h - 0;
  }

  // private methods can access
  // all member objects and methods
  // but can not themselves be referenced
  // outside its defined scope (class)
  function private_a() {
    return 0 +
      a_private_var +
      b_global +
      self.c_instance_public +
      self.d_prototype_public +
      e_private_func_v() +
      f_private_func() +
      g_global_func() +
      self.h_privilaged_func() +
      self.i_prototype_func() +
      0;
  }

  global_closure_a = function() {
    return 0 +
      a_private_var +
      b_global +
      self.c_instance_public +
      self.d_prototype_public +
      e_private_func_v() +
      f_private_func() +
      g_global_func() +
      self.h_privilaged_func() +
      self.i_prototype_func() +
      0;
  }

  // privilaged methods can access
  // all member objects and methods
  // and can themselves be referenced
  // outside its defined scope (class)
  //
  // essentially public as defined by most
  // other OOP language such as Java/C#
  this.privilaged_a = function() {
    return 0 +
      a_private_var +
      b_global +
      this.c_instance_public +
      this.d_prototype_public +
      e_private_func_v() +
      f_private_func() +
      g_global_func() +
      this.h_privilaged_func() +
      this.i_prototype_func() +
      0;
  }

  // public
  this.privilaged_calls_private_a = function() {
    return private_a() - 0;
  }

  // public
  this.privilaged_calls_public_a = function() {
    return this.public_a() - 0;
  }
}
C.prototype.d_prototype_public = VAL_ENUM.d - 0;

C.prototype.i_prototype_func = function() {
  return VAL_ENUM.i - 0;
}

C.prototype.public_a = function() {
    return 0 +
      //a_private_var +
      b_global +
      this.c_instance_public +
      this.d_prototype_public +
      //e_private_func_v() +
      //f_private_func() +
      g_global_func() +
      this.h_privilaged_func() +
      this.i_prototype_func() +
      0;
}

//alert("C defined");
