Quiz 10: Developing Object-Oriented Php
Computing
Q 1Q 1
The term object-oriented programming (OOP) refers to the concept of merging related variables and functions into a single interface.
Free
True False
True
Q 2Q 2
The term object specifically refers to programming code and data that can be treated as an individual unit or component.
Free
True False
True
Free
True False
False
Q 4Q 4
The term data refers to information contained within objects or other types of storage structures
Free
True False
Free
True False
Free
True False
Q 7Q 7
Objects are encapsulated, which means that all code and required data are contained within the object itself.
Free
True False
Q 8Q 8
An interface refers to objects that are required for a source program to communicate with data.
Free
True False
Q 9Q 9
In object-oriented programming, the code, methods, attributes, and other information that make up an object are organized into classes.
Free
True False
Free
True False
Q 11Q 11
When you delete an object from an existing class, you are said to be instantiating the object.
Free
True False
Free
True False
Q 13Q 13
A class constructor is a special attribute with the same name as its class that is called automatically when an object from the class is instantiated.
Free
True False
Q 14Q 14
After you instantiate an object, you use a hyphen and a greater-than symbol (->), referred to as member selection notation, to access the methods and properties contained in the object.
Free
True False
Free
True False
Free
True False
Free
True False
Free
True False
Q 19Q 19
To create a class in PHP, you use the class keyword to write a class definition, which contains that data members and member functions that make up the class.
Free
True False
Q 20Q 20
The term, garbage collection, refers to cleaning up, or reclaiming, memory that is reserved by a program.
Free
True False
Q 21Q 21
The principle of information hiding states that any class members that other programmers, sometimes called clients, do not need to access or know about should be hidden.
Free
True False
Q 22Q 22
Access specifiers control a client's access to individual data members and member functions.
Free
True False
Free
True False
Q 24Q 24
The public access specifier allows anyone to call a class's member function or to modify or retrieve the value of a data member.
Free
True False
Q 25Q 25
Serialization refers to the process of converting an object into binary data that you can store for reuse.
Free
True False
Q 26Q 26
A constructor function is a special function that is called automatically when an object from a class is instantiated.
Free
True False
Q 27Q 27
A destructor function cleans up any resources allocated to an object after the object is destroyed.
Free
True False
Q 28Q 28
Accessor functions are private member functions that a client can call to retrieve or modify the value of a data member.
Free
True False
Q 29Q 29
When you serialize an object with the serialize() function, PHP looks in the object's class for a special function named __sleep() function, which you can use to perform many of same tasks as a destructor function.
Free
True False
Q 30Q 30
Although the destructor function is always called, a constructor function is only called when you instantiate a new class object.
Free
True False
Q 31Q 31
Reusable software objects that can be incorporated into multiple programs is called ____.
A) object-based programming
B) object-oriented programming
C) snipets
D) functions
Free
Multiple Choice
Q 32Q 32
Programming code and data that can be treated as an individual unit or component is known as a(n) ____.
A) method
B) function
C) attribute
D) object
Free
Multiple Choice
Free
Multiple Choice
Q 34Q 34
Information contained within variables is called ____.
A) code
B) data
C) components
D) objects
Free
Multiple Choice
Q 35Q 35
____ are functions associated with an object.
A) Properties
B) Data
C) Methods
D) Return functions
Free
Multiple Choice
Q 36Q 36
____ are variables associated with an object.
A) Properties
B) Components
C) Elements
D) Parameters
Free
Multiple Choice
Q 37Q 37
Objects in which all code and required data are contained within the object itself are ____.
A) instances
B) contained
C) null
D) encapsulated
Free
Multiple Choice
Q 38Q 38
Methods and properties that are required for a source program to communicate with an object are referred to as a(n) ____.
A) interface
B) attribute
C) function
D) class
Free
Multiple Choice
Free
Multiple Choice
Q 40Q 40
An object created from an existing class is called a(n) ___
A) method
B) property
C) instance
D) variable
Free
Multiple Choice
Q 41Q 41
____ the object means creating an object from a class.
A) Editing
B) Threading
C) Instantiating
D) Copying
Free
Multiple Choice
Q 42Q 42
A particular instance of an object ____ the methods and properties its class.
A) cancels
B) inherits
C) creates
D) instantiates
Free
Multiple Choice
Q 43Q 43
When an object from the class is instantiated it automatically calls a(n) ____, which is a special function with the same name as its class.
A) class constructor
B) method
C) attribute
D) member function
Free
Multiple Choice
Q 44Q 44
A hyphen and a greater-than symbol used to access the methods and properties contained in an object are referred to as ____.
A) class
B) member selection notation
C) selector
D) data structure
Free
Multiple Choice
Q 45Q 45
____ is a system for organizing data.
A) Programming
B) Database Storage
C) Data structure
D) Class creation
Free
Multiple Choice
Q 46Q 46
____ are the functions and variables defined in a class.
A) Constructors
B) Methods
C) Function Members
D) Class Members
Free
Multiple Choice
Q 47Q 47
Class variables are known as ____.
A) class members
B) data members
C) classmates
D) parameters
Free
Multiple Choice
Q 48Q 48
Class functions are called ____.
A) methods
B) constructors
C) function members
D) class members
Free
Multiple Choice
Q 49Q 49
To create a class in PHP, use the ____ keyword to write a class definition.
A) definition
B) class
C) create
D) construct
Free
Multiple Choice
Q 50Q 50
The ____ portion of the class definition is the name of the new class.
A) Definition
B) Object
C) MemberClass
D) ClassName
Free
Multiple Choice
Q 51Q 51
Use the ____ comparison operator to determine whether an object is instantiated from a given class.
A) instanceof
B) classof
C) objectof
D) memberof
Free
Multiple Choice
Q 52Q 52
The ____ function determines whether a class exists and is available to the current script.
A) object_exists()
B) get_class()
C) class_exists()
D) member_exists()
Free
Multiple Choice
Q 53Q 53
Cleaning up, or reclaiming memory that is reserved by a program is called ___
A) housekeeping
B) garbage collection
C) refreshing
D) flushing
Free
Multiple Choice
Q 54Q 54
Class members that other programmers do not need access to should be ____.
A) hidden
B) deleted
C) saved
D) copied
Free
Multiple Choice
Q 55Q 55
To enable anyone to call a class's member function use a(n) ____.
A) private access specifier
B) public access specifier
C) hidden access specifier
D) open access specifier
Free
Multiple Choice
Free
Short Answer
Free
Short Answer
Free
Short Answer
Free
Short Answer
Free
Short Answer
Q 61Q 61
In order for a source program to communicate with an object, it must use a(n) ____________________ of methods and properties.
Free
Short Answer
Free
Short Answer
Free
Short Answer
Q 64Q 64
When you use an object in your program, you create a(n) ____________________ of the class of the object.
Free
Short Answer
Q 65Q 65
You declare an object in PHP by using the ____________________ operator with a class constructor.
Free
Short Answer
Q 66Q 66
____________________ are primarily used to initialize properties when an object is first instantiated.
Free
Short Answer
Free
Short Answer
Q 68Q 68
To determine if the database connection failed when working with a mysqli object, you need to use the ____________________ data member of the mysqli object to retrieve the error code from the last connection attempt.
Free
Short Answer
Free
Short Answer
Q 70Q 70
To use the variables and functions in a class, you instantiate an object by declaring the object as a new ____________________ of the class.
Free
Short Answer
Q 71Q 71
After you instantiate a class object, ____________________ are referred to as properties of the object.
Free
Short Answer
Q 72Q 72
Instances of objects ____________________ their characteristics, such as class members, from the class upon which they are based.
Free
Short Answer
Q 73Q 73
The syntax for using the instanceof operator is object_name instanceof ____________________.
Free
Short Answer
Q 74Q 74
Garbage collection is a term that refers to cleaning up or ____________________ memory that is reserved by a program.
Free
Short Answer
Q 75Q 75
____________________ gives an encapsulated object its black box capabilities so that users of a class can see only the class members that you allow them to see.
Free
Short Answer
Q 76Q 76
The protected access specifier is used with a more advanced object-oriented programming technique called ____________________.
Free
Short Answer
Free
Short Answer
Free
Short Answer
Free
Short Answer