Details of this Paper





Part 1 of 1 - Inline Text;This exam covers Units 1, 2 and 3. It is a closed-book exam. You may not use any references. The exam is timed. You may only take it once.;Question 1 of 36;2.0 Points;All methods in an interface must be abstract methods.;A. True;B. False;Reset Selection;Question 2 of 36;2.0 Points;All methods in an abstract class must be declared as abstract methods.;A. True;B. False;Reset Selection;Question 3 of 36;2.0 Points;PHP does not allow multiple inheritance.;A. True;B. False;Reset Selection;Question 4 of 36;2.0 Points;PHP does not allow constructor overriding.;A. True;B. False;Reset Selection;Question 5 of 36;2.0 Points;Given a class named Person;class Person;private $name;public function __construct($name);$this->name = $name;Which of the following creates an object from the Person class?;A. $judy = new Person();B. $aPerson = new Person("judy");C. $p = Person(), $p->setName("judy");D. $p = __construct("judy");Reset Selection;Question 6 of 36;2.0 Points;Which of the following is NOT true regarding a PHP class constructor?;A. A constructor is called whenever a new instance is created.;B. A constructor can not accept any parameter.;C. A constructor is always named __construct.;D. A constructor could inherit code from a parent class.;Reset Selection;Question 7 of 36;2.0 Points;Which of the following creates a default constructor for the class called Animal?;A. public function __construct() { };B. public function Animal() { };C. public function __construct($name) { };D. public function __Animal() { };Reset Selection;Question 8 of 36;2.0 Points;In OOP, class data are usually private so access to class data is restricted. This design practice is called _______.;A. data composition;B. data hiding;C. data restriction;D. data abstraction;Reset Selection;Question 9 of 36;2.0 Points;The template or blueprint that defines abstract characteristics of all real world objects of the same kind is called a(n) ______ in OOP.;A. object;B. constructor;C. class;D. function;Reset Selection;Question 10 of 36;2.0 Points;In OOP, the practice of deriving new classes from existing classes is called __________.;A. inheritance;B. encapsulation;C. polymorphism;D. composition;Reset Selection;Question 11 of 36;2.0 Points;Which of the following statement is NOT true?;A. An abstract method contains no implementation.;B. A class that contains one or more abstract methods must be declared as "abstract".;C. An abstract class can't be instantiated.;D. A class that extends an abstract class can not be abstract.;Reset Selection;Question 12 of 36;2.0 Points;The public methods of a class are also known as the class's _____.;A. accessor;B. interface;C. implementation;D. constructor;Reset Selection;Question 13 of 36;2.0 Points;Given a class method named myMethod;class A;function myMethod;//code omitted;If you don't want the method to be overridden, what keyword should be used in the blank?;A. final;B. static;C. private;D. abstract;Reset Selection;Question 14 of 36;2.0 Points;Given classes named Parent and Child;class Parent;public function aMethod($name);//code omitted;class Child extends Parent;//insert a method here;Which of the following methods in class Child overrides the method aMethod defined in class Parent?;A. public function aMethod($a, $b) { //code omitted };B. public function bMethod($name) { //code omitted };C. public function aMethod($name) { //code omitted };D. public function bMethod($a, $b) { //code omitted };Reset Selection;Question 15 of 36;2.0 Points;Which of the following is NOT a valid PHP visibility modifier?;A. protected;B. private;C. friendly;D. public;Reset Selection;Question 16 of 36;2.0 Points;In OOP, composition is sometimes referred to as a(n) ______ relationship.;A. has-a;B. is-a;C. inheritance;D. interface;Reset Selection;Question 17 of 36;2.0 Points;A _____ variable represents classwide information that is shared by all the objects of the class.;A. public;B. final;C. abstract


Paper#63342 | Written in 18-Jul-2015

Price : $27