In the following code, which classes can be instantiated?

In the following code, which classes can be instantiated?

abstract class Graphics {

abstract function draw($im, $col);

}

abstract class Point1 extends Graphics {

public $x, $y;

}

function _construct($x, $y) {

$this->x = $x;

$this->y = $y;

}

function draw($im, $col) {

lmageSetPixel($im, $this->x, $this->y, $col);

}

class Point2 extends Point1 {}

abstract class Point3 extends Point2 {}
A . Graphics
B . Point1
C . Point2
D . Point3
E . None, the code is invalid

Answer: C

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments