adplus-dvertising
frame-decoration

Question

If your object must inherit behavior from a number of sources you must use a/an

a.

Interface

b.

Object

c.

Abstract class

d.

Static class

Posted under PHP

Answer: (a).Interface

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. If your object must inherit behavior from a number of sources you must use a/an

Similar Questions

Discover Related MCQs

Q. If one intends to create a model that will be assumed by a number of closely related objects, which class must be used?

Q. 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.

Q. The class from which the child class inherits is called..

i) Child class
ii) Parent class
iii) Super class
iv) Base class

Q. Which one of the following is the right way to clone an object?

Q. Which version of PHP introduced the advanced concepts of OOP?

Q. Which of the following advanced OOP features is/are not supported by PHP?

i) Method overloading
ii) Multiple Inheritance
iii) Namespaces
iv) Object Cloning

Q. Which keyword allows class members (methods and properties) to be used without needing to instantiate a new instance of the class?

Q. Which keyword is used to refer to properties or methods within the class itself?

Q. Which one of the following keyword is used to inherit our subclass into a superclass?

Q. Which one of the following functions is used to determine object type?

Q. Which one of the following functions is used to determine whether a class exists?

Q. Which version of PHP introduced the instanceof keyword?

Q. PHP recognizes constructors by the name_________

Q. Which of the following statements is/are true about Constructors in PHP?

i) PHP 4 introduced class constructors.
ii) Constructors can accept parameters.
iii) Constructors can call class methods or other functions.
iv) Class constructors can call on other constructors.

Q. Which method scope prevents a method from being overridden by a subclass?

Q. Which of the following method scopes is/are not supported by PHP?

i) private
ii) final
iii) static
iv) abstract

Q. Which of the following is/are the right way to declare a method?

i) function functionName() { function body }
ii) scope function functionName() { function body }
iii) method methodName() { method body }
iv) scope method methodName() { method body }

Q. Which one of the following is the right way to invoke a method?

Q. Which one of the following is the right way to call a class constant, given that the class is mathFunction?

Q. Which one of the following is the right way to define a constant?