MCQs
Total Questions : 30
| Page 3 of 3 pages
Answer: Option C. -> (i) and (ii)
The advanced OOP features are: Object cloning, Inheritance, Interfaces, Abstract classes, and Namespaces.
Question 22. Which of the following is/are true for an abstract class?(i) A class is declared abstract by prefacing the definition with the word abstract.(ii) A class is declare abstract by using the keyword implements.(iii) It is a class that really isn't supposed to ever be instantiated but instead serves as a base class.(iv) Attempting to instantiate an abstract class results in an error.
Answer: Option A. -> Only (ii)
Only (ii)
Answer: Option B. -> destinationObject = clone targetObject;
You can clone an object by prefacing it with the clone keyword.
Answer: Option B. -> PHP 5
PHP 5
Answer: Option D. -> (ii) and (iv)
(ii) and (iv)
Answer: Option C. -> Abstract class
Abstract class
Answer: Option A. -> Interface
Interface
Answer: Option A. -> __call
__call
Answer: Option D. -> Method chaining
Following is a basic example of method chaining in php: $a = new Order();
$a->CreateOrder()->sendOrderEmail()->createShipment();
Answer: Option B. -> __clone()
__clone()