interkrome
01-12-2007, 05:11 AM
class A1
{ var $attribute1;
function operation1()
....}
class A2 extends A1
{ var $attribute2;
function operation2()
....}
$b=newA2();
$a=newA1();
the above code represents?
a. polymorphism
b. relationship
c. inheritance
d. class abstraction
all of the following accesses would be valid except?
a.$b->operation1();
b.$b->attribute1=10;
c.$a->operation1();
d.$a->operation2();
e.$b->attribute1=10;
{ var $attribute1;
function operation1()
....}
class A2 extends A1
{ var $attribute2;
function operation2()
....}
$b=newA2();
$a=newA1();
the above code represents?
a. polymorphism
b. relationship
c. inheritance
d. class abstraction
all of the following accesses would be valid except?
a.$b->operation1();
b.$b->attribute1=10;
c.$a->operation1();
d.$a->operation2();
e.$b->attribute1=10;