Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend Exam 200-710 Topic 2 Question 64 Discussion

Actual exam question for Zend's 200-710 exam
Question #: 64
Topic #: 2
[All 200-710 Questions]

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) {

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

}

}

class Point2 extends Point1 { }

abstract class Point3 extends Point2 { }

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Hyman
17 days ago
This exam is really testing our ability to abstract-ly think. I'm going to go with 'None of the Above' and just become a Hyman instead.
upvoted 0 times
Edna
1 days ago
A) Graphics
upvoted 0 times
...
...
Nakisha
1 months ago
Haha, this question is like a game of 'Guess the Abstraction'. I'm going with D) Point3, just to keep the guessing going!
upvoted 0 times
Hortencia
8 days ago
B) Point1
upvoted 0 times
...
Theola
16 days ago
A) Graphics
upvoted 0 times
...
...
Queen
2 months ago
Wait, I thought abstract classes couldn't be instantiated? E) None, the code is invalid seems like the right choice to me.
upvoted 0 times
Evelynn
21 days ago
Yes, you're correct. Option E) None, the code is invalid is the right choice.
upvoted 0 times
...
Michell
22 days ago
I think you're right, abstract classes cannot be instantiated.
upvoted 0 times
...
...
Ty
2 months ago
I think the answer is C) Point2. The Point2 class extends the non-abstract Point1 class, so it should be able to be instantiated.
upvoted 0 times
...
Rosina
2 months ago
I disagree, I think Point2 can also be instantiated since it extends Point1.
upvoted 0 times
...
Willetta
2 months ago
The correct answer is B) Point1. The Point1 class can be instantiated because it extends the abstract Graphics class and implements the required draw() method.
upvoted 0 times
Hildegarde
27 days ago
E) None, the code is invalid
upvoted 0 times
...
Jacinta
1 months ago
D) Point3
upvoted 0 times
...
Devon
1 months ago
C) Point2
upvoted 0 times
...
Robt
1 months ago
B) Point1
upvoted 0 times
...
Darrin
1 months ago
A) Graphics
upvoted 0 times
...
...
Natalya
2 months ago
I agree with Ronny, Point1 is the only class that can be instantiated because it extends Graphics.
upvoted 0 times
...
Ronny
2 months ago
I think only Point1 can be instantiated.
upvoted 0 times
...

Save Cancel