Deck 10: Developing Object-Oriented Php

Full screen (f)
exit full mode
Question
Class names in PHP usually begin with a lowercase letter.
Use Space or
up arrow
down arrow
to flip the card.
Question
The term object specifically refers to programming code and data that can be treated as an individual unit or component.
Question
The term object-oriented programming (OOP) refers to the concept of merging related variables and functions into a single interface.
Question
Objects are encapsulated, which means that all code and required data are contained within the object itself.
Question
The term data structure refers to a system for organizing classes.
Question
Data are often also called components.
Question
An interface refers to objects that are required for a source program to communicate with data.
Question
When you delete an object from an existing class, you are said to be instantiating the object.
Question
The term, garbage collection, refers to cleaning up, or reclaiming, memory that is reserved by a program.
Question
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.
Question
Class functions are referred to as data members or member data.
Question
Class variables are referred to as data members or member variables.
Question
In object-oriented programming, the code, methods, attributes, and other information that make up an object are organized into classes.
Question
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.
Question
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.
Question
The term data refers to information contained within objects or other types of storage structures
Question
The functions and variables defined in a class are called functional members
Question
Variables that are associated with an object are called properties or attributes.
Question
The functions associated with an object are called methods.
Question
An instance is an object that has been created from an existing class.
Question
Although the destructor function is always called, a constructor function is only called when you instantiate a new class object.
Question
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
Question
A constructor function is a special function that is called automatically when an object from a class is instantiated.
Question
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.
Question
Objects are often called ____.

A) components
B) properties
C) reusable code
D) functions
Question
Access specifiers control a client's access to individual data members and member functions.
Question
Objects are organized into ____.

A) programs
B) instances
C) functions
D) classes
Question
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.
Question
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
Question
Serialization refers to the process of converting an object into binary data that you can store for reuse.
Question
Accessor functions are private member functions that a client can call to retrieve or modify the value of a data member.
Question
An object created from an existing class is called a(n) ___

A) method
B) property
C) instance
D) variable
Question
____ are variables associated with an object.

A) Properties
B) Components
C) Elements
D) Parameters
Question
Reusable software objects that can be incorporated into multiple programs is called ____.

A) object-based programming
B) object-oriented programming
C) snipets
D) functions
Question
____ are functions associated with an object.

A) Properties
B) Data
C) Methods
D) Return functions
Question
Information contained within variables is called ____.

A) code
B) data
C) components
D) objects
Question
There are three levels of access specifiers in PHP: public, private, and protected.
Question
A destructor function cleans up any resources allocated to an object after the object is destroyed.
Question
The public access specifier allows anyone to call a class's member function or to modify or retrieve the value of a data member.
Question
Objects in which all code and required data are contained within the object itself are ____.

A) instances
B) contained
C) null
D) encapsulated
Question
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
Question
Class variables are known as ____.

A) class members
B) data members
C) classmates
D) parameters
Question
Another name for a property is a(n) ____________________.
Question
____________________ can be referred to as components.
Question
____________________ places code inside what programmers like to call a "black box."
Question
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
Question
____ is a system for organizing data.

A) Programming
B) Database Storage
C) Data structure
D) Class creation
Question
A particular instance of an object ____ the methods and properties its class.

A) cancels
B) inherits
C) creates
D) instantiates
Question
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
Question
Data refers to information contained within ____________________.
Question
To create a class in PHP, use the ____ keyword to write a class definition.

A) definition
B) class
C) create
D) construct
Question
Use the ____ comparison operator to determine whether an object is instantiated from a given class.

A) instanceof
B) classof
C) objectof
D) memberof
Question
The ____ portion of the class definition is the name of the new class.

A) Definition
B) Object
C) MemberClass
D) ClassName
Question
Class functions are called ____.

A) methods
B) constructors
C) function members
D) class members
Question
____________________ associated with an object are called methods.
Question
____ are the functions and variables defined in a class.

A) Constructors
B) Methods
C) Function Members
D) Class Members
Question
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()
Question
____ the object means creating an object from a class.

A) Editing
B) Threading
C) Instantiating
D) Copying
Question
Cleaning up, or reclaiming memory that is reserved by a program is called ___

A) housekeeping
B) garbage collection
C) refreshing
D) flushing
Question
Class members that other programmers do not need access to should be ____.

A) hidden
B) deleted
C) saved
D) copied
Question
The ____________________ function allows you to format variables in an output string.
Question
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.
Question
A programming object and its interface can be compared to a handheld ____________________.
Question
Data structures are a system for organizing ____________________.
Question
A(n) ____________________ is a template that serves as the basis for new objects.
Question
After you instantiate a class object, ____________________ are referred to as properties of the object.
Question
Garbage collection is a term that refers to cleaning up or ____________________ memory that is reserved by a program.
Question
____________________ stores both data members and member functions into strings.
Question
When you use an object in your program, you create a(n) ____________________ of the class of the object.
Question
____________________ are primarily used to initialize properties when an object is first instantiated.
Question
The protected access specifier is used with a more advanced object-oriented programming technique called ____________________.
Question
You declare an object in PHP by using the ____________________ operator with a class constructor.
Question
The syntax for using the instanceof operator is object_name instanceof ____________________.
Question
____________________ access does not restrict a class's internal access to its own members.
Question
____________________ 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.
Question
In order for a source program to communicate with an object, it must use a(n) ____________________ of methods and properties.
Question
To use the variables and functions in a class, you instantiate an object by declaring the object as a new ____________________ of the class.
Question
Instances of objects ____________________ their characteristics, such as class members, from the class upon which they are based.
Question
The best way to initialize a data member is with a(n) ____________________.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/79
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 10: Developing Object-Oriented Php
1
Class names in PHP usually begin with a lowercase letter.
False
2
The term object specifically refers to programming code and data that can be treated as an individual unit or component.
True
3
The term object-oriented programming (OOP) refers to the concept of merging related variables and functions into a single interface.
True
4
Objects are encapsulated, which means that all code and required data are contained within the object itself.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
5
The term data structure refers to a system for organizing classes.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
6
Data are often also called components.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
7
An interface refers to objects that are required for a source program to communicate with data.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
8
When you delete an object from an existing class, you are said to be instantiating the object.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
9
The term, garbage collection, refers to cleaning up, or reclaiming, memory that is reserved by a program.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
10
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.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
11
Class functions are referred to as data members or member data.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
12
Class variables are referred to as data members or member variables.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
13
In object-oriented programming, the code, methods, attributes, and other information that make up an object are organized into classes.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
14
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.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
15
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.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
16
The term data refers to information contained within objects or other types of storage structures
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
17
The functions and variables defined in a class are called functional members
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
18
Variables that are associated with an object are called properties or attributes.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
19
The functions associated with an object are called methods.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
20
An instance is an object that has been created from an existing class.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
21
Although the destructor function is always called, a constructor function is only called when you instantiate a new class object.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
22
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
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
23
A constructor function is a special function that is called automatically when an object from a class is instantiated.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
24
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.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
25
Objects are often called ____.

A) components
B) properties
C) reusable code
D) functions
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
26
Access specifiers control a client's access to individual data members and member functions.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
27
Objects are organized into ____.

A) programs
B) instances
C) functions
D) classes
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
28
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.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
29
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
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
30
Serialization refers to the process of converting an object into binary data that you can store for reuse.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
31
Accessor functions are private member functions that a client can call to retrieve or modify the value of a data member.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
32
An object created from an existing class is called a(n) ___

A) method
B) property
C) instance
D) variable
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
33
____ are variables associated with an object.

A) Properties
B) Components
C) Elements
D) Parameters
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
34
Reusable software objects that can be incorporated into multiple programs is called ____.

A) object-based programming
B) object-oriented programming
C) snipets
D) functions
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
35
____ are functions associated with an object.

A) Properties
B) Data
C) Methods
D) Return functions
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
36
Information contained within variables is called ____.

A) code
B) data
C) components
D) objects
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
37
There are three levels of access specifiers in PHP: public, private, and protected.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
38
A destructor function cleans up any resources allocated to an object after the object is destroyed.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
39
The public access specifier allows anyone to call a class's member function or to modify or retrieve the value of a data member.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
40
Objects in which all code and required data are contained within the object itself are ____.

A) instances
B) contained
C) null
D) encapsulated
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
41
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
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
42
Class variables are known as ____.

A) class members
B) data members
C) classmates
D) parameters
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
43
Another name for a property is a(n) ____________________.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
44
____________________ can be referred to as components.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
45
____________________ places code inside what programmers like to call a "black box."
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
46
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
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
47
____ is a system for organizing data.

A) Programming
B) Database Storage
C) Data structure
D) Class creation
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
48
A particular instance of an object ____ the methods and properties its class.

A) cancels
B) inherits
C) creates
D) instantiates
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
49
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
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
50
Data refers to information contained within ____________________.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
51
To create a class in PHP, use the ____ keyword to write a class definition.

A) definition
B) class
C) create
D) construct
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
52
Use the ____ comparison operator to determine whether an object is instantiated from a given class.

A) instanceof
B) classof
C) objectof
D) memberof
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
53
The ____ portion of the class definition is the name of the new class.

A) Definition
B) Object
C) MemberClass
D) ClassName
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
54
Class functions are called ____.

A) methods
B) constructors
C) function members
D) class members
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
55
____________________ associated with an object are called methods.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
56
____ are the functions and variables defined in a class.

A) Constructors
B) Methods
C) Function Members
D) Class Members
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
57
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()
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
58
____ the object means creating an object from a class.

A) Editing
B) Threading
C) Instantiating
D) Copying
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
59
Cleaning up, or reclaiming memory that is reserved by a program is called ___

A) housekeeping
B) garbage collection
C) refreshing
D) flushing
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
60
Class members that other programmers do not need access to should be ____.

A) hidden
B) deleted
C) saved
D) copied
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
61
The ____________________ function allows you to format variables in an output string.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
62
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.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
63
A programming object and its interface can be compared to a handheld ____________________.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
64
Data structures are a system for organizing ____________________.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
65
A(n) ____________________ is a template that serves as the basis for new objects.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
66
After you instantiate a class object, ____________________ are referred to as properties of the object.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
67
Garbage collection is a term that refers to cleaning up or ____________________ memory that is reserved by a program.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
68
____________________ stores both data members and member functions into strings.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
69
When you use an object in your program, you create a(n) ____________________ of the class of the object.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
70
____________________ are primarily used to initialize properties when an object is first instantiated.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
71
The protected access specifier is used with a more advanced object-oriented programming technique called ____________________.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
72
You declare an object in PHP by using the ____________________ operator with a class constructor.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
73
The syntax for using the instanceof operator is object_name instanceof ____________________.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
74
____________________ access does not restrict a class's internal access to its own members.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
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.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
76
In order for a source program to communicate with an object, it must use a(n) ____________________ of methods and properties.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
77
To use the variables and functions in a class, you instantiate an object by declaring the object as a new ____________________ of the class.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
78
Instances of objects ____________________ their characteristics, such as class members, from the class upon which they are based.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
79
The best way to initialize a data member is with a(n) ____________________.
Unlock Deck
Unlock for access to all 79 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 79 flashcards in this deck.