Deck 7: Using Object Oriented Javascript

ملء الشاشة (f)
exit full mode
سؤال
The code for a method must be stored in an external function.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The ____ class contains methods and properties for manipulating the date and time.

A) Zone
B) Calendar
C) Date
D) Time
سؤال
When working with a date, JavaScript stores the month as a ____.

A) value from 0-11
B) value from 1-12
C) two-letter abbreviation
D)three-letter abbreviation
سؤال
____ refers to cleaning up, or reclaiming, memory that is reserved by a program.

A) Information hiding
B) Garbage collection
C) Data collection
D) Object hiding
سؤال
A(n)____ function is a function that is used as the basis for a custom object.

A) constructor
B) object
C) instance
D) class
سؤال
The code (methods and statements)and data (variables and constants)contained in an encapsulated object are accessed through a(n)____.

A) black box
B) view
C) interface
D) template
سؤال
The ____ class contains methods for manipulating numbers and properties that contain static values representing some of the numeric limitations in the JavaScript language.

A) Integer
B) Number
C) Math
D) Limits
سؤال
To delete a specific property in a custom object, you use the ____ operator.

A) remove
B) cancel
C) erase
D) delete
سؤال
The value of an object property can be another object.
سؤال
The code  new Date() creates an empty Date object.
سؤال
To execute the same statement or command block for all the properties within a custom object, you can use the ____ statement.

A) for/each
B) while/in
C) for/in
D) loop/in
سؤال
You can use the Math  object directly in your programs without instantiating a new object.
سؤال
The term ____ refers to information contained within variables or other types of storage structures.

A) data
B) object
C) class
D) instance
سؤال
A(n)____ is an object that has been created from an existing class.

A) instance
B) interface
C) template
D) black box
سؤال
You can create a function that will be used as an object method by referring to any object properties it contains with the ____ reference.

A) self
B) this
C) super
D) object
سؤال
The ____ class contains methods and properties for performing mathematical calculations in your programs.

A) Number
B) Integer
C) Function
D) Math
سؤال
A(n)____ array is an array whose elements are referred to with an alphanumeric key instead of an index number.

A) parallel
B) class
C) associative
D) bidimensional
سؤال
Objects are also called ____.

A) data
B) functions
C) methods
D) components
سؤال
The ____ property is a built-in property that specifies the constructor from which an object was instantiated.

A) experiment
B) try
C) prototype
D) test
سؤال
You can create an empty object by assigning a pair of empty braces to a variable  name.
سؤال
Which Number class method can you use to convert a number to a string that is formatted with local numeric formatting style?

A)toFixed()
B)toLocaleString()
C)toPrecision()
D)toString()
سؤال
You can create an empty object by assigning a pair of empty __________ to a variable name.
سؤال
Match between columns
Programming code and data that can be treated as an individual unit or component
object
Programming code and data that can be treated as an individual unit or component
associative
Programming code and data that can be treated as an individual unit or component
interface
Programming code and data that can be treated as an individual unit or component
class
Programming code and data that can be treated as an individual unit or component
sqrt()
Programming code and data that can be treated as an individual unit or component
toFixed()
Programming code and data that can be treated as an individual unit or component
literal
Programming code and data that can be treated as an individual unit or component
round( )
Programming code and data that can be treated as an individual unit or component
new Date()
Programming code and data that can be treated as an individual unit or component
method
Returns the square root of the specified value
object
Returns the square root of the specified value
associative
Returns the square root of the specified value
interface
Returns the square root of the specified value
class
Returns the square root of the specified value
sqrt()
Returns the square root of the specified value
toFixed()
Returns the square root of the specified value
literal
Returns the square root of the specified value
round( )
Returns the square root of the specified value
new Date()
Returns the square root of the specified value
method
A function assigned a name within a custom object
object
A function assigned a name within a custom object
associative
A function assigned a name within a custom object
interface
A function assigned a name within a custom object
class
A function assigned a name within a custom object
sqrt()
A function assigned a name within a custom object
toFixed()
A function assigned a name within a custom object
literal
A function assigned a name within a custom object
round( )
A function assigned a name within a custom object
new Date()
A function assigned a name within a custom object
method
Type of array that enables you to add object properties incorporating numbers
object
Type of array that enables you to add object properties incorporating numbers
associative
Type of array that enables you to add object properties incorporating numbers
interface
Type of array that enables you to add object properties incorporating numbers
class
Type of array that enables you to add object properties incorporating numbers
sqrt()
Type of array that enables you to add object properties incorporating numbers
toFixed()
Type of array that enables you to add object properties incorporating numbers
literal
Type of array that enables you to add object properties incorporating numbers
round( )
Type of array that enables you to add object properties incorporating numbers
new Date()
Type of array that enables you to add object properties incorporating numbers
method
The easiest way to declare a custom object
object
The easiest way to declare a custom object
associative
The easiest way to declare a custom object
interface
The easiest way to declare a custom object
class
The easiest way to declare a custom object
sqrt()
The easiest way to declare a custom object
toFixed()
The easiest way to declare a custom object
literal
The easiest way to declare a custom object
round( )
The easiest way to declare a custom object
new Date()
The easiest way to declare a custom object
method
Returns a value rounded to the nearest integer
object
Returns a value rounded to the nearest integer
associative
Returns a value rounded to the nearest integer
interface
Returns a value rounded to the nearest integer
class
Returns a value rounded to the nearest integer
sqrt()
Returns a value rounded to the nearest integer
toFixed()
Returns a value rounded to the nearest integer
literal
Returns a value rounded to the nearest integer
round( )
Returns a value rounded to the nearest integer
new Date()
Returns a value rounded to the nearest integer
method
Elements required for a source program to communicate with an object
object
Elements required for a source program to communicate with an object
associative
Elements required for a source program to communicate with an object
interface
Elements required for a source program to communicate with an object
class
Elements required for a source program to communicate with an object
sqrt()
Elements required for a source program to communicate with an object
toFixed()
Elements required for a source program to communicate with an object
literal
Elements required for a source program to communicate with an object
round( )
Elements required for a source program to communicate with an object
new Date()
Elements required for a source program to communicate with an object
method
Converts a number to a string using the number of decimal places specified
object
Converts a number to a string using the number of decimal places specified
associative
Converts a number to a string using the number of decimal places specified
interface
Converts a number to a string using the number of decimal places specified
class
Converts a number to a string using the number of decimal places specified
sqrt()
Converts a number to a string using the number of decimal places specified
toFixed()
Converts a number to a string using the number of decimal places specified
literal
Converts a number to a string using the number of decimal places specified
round( )
Converts a number to a string using the number of decimal places specified
new Date()
Converts a number to a string using the number of decimal places specified
method
A template, or blueprint, that serves as the basis for new objects
object
A template, or blueprint, that serves as the basis for new objects
associative
A template, or blueprint, that serves as the basis for new objects
interface
A template, or blueprint, that serves as the basis for new objects
class
A template, or blueprint, that serves as the basis for new objects
sqrt()
A template, or blueprint, that serves as the basis for new objects
toFixed()
A template, or blueprint, that serves as the basis for new objects
literal
A template, or blueprint, that serves as the basis for new objects
round( )
A template, or blueprint, that serves as the basis for new objects
new Date()
A template, or blueprint, that serves as the basis for new objects
method
Creates a Date object containing the current date
object
Creates a Date object containing the current date
associative
Creates a Date object containing the current date
interface
Creates a Date object containing the current date
class
Creates a Date object containing the current date
sqrt()
Creates a Date object containing the current date
toFixed()
Creates a Date object containing the current date
literal
Creates a Date object containing the current date
round( )
Creates a Date object containing the current date
new Date()
Creates a Date object containing the current date
method
سؤال
Which class requires you to use a constructor?

A) Math
B) Number
C) Date
D) Array
سؤال
How can you get the full text of the day of the week based on information retrieved from a Date object?
سؤال
Describe two ways of adding properties to an object.
سؤال
What is a sub-object? Provide an example.
سؤال
When creating an object using a literal, you separate multiple property-value pairs with ____.

A)colons
B)spaces
C)semicolons
D)commas
سؤال
You can append the name of any Number class method or property to the name of an existing variable that contains a(n)____________________ value.
سؤال
How do you declare a property within an object literal?
سؤال
Which method of the Math object rounds a value to the next lowest integer?

A)ceil()
B)floor()
C)max()
D)min()
سؤال
What are some of the benefits of encapsulation?
سؤال
Explain the difference between the Number and Math classes.
سؤال
Why is JavaScript said to be an object-based programming language?
سؤال
What is garbage collection and how is it performed in JavaScript apps?
سؤال
To add a property to a constructor function, you must add a statement to the function body that uses the ____ keyword.

A)NaN
B)function
C)this
D)property
سؤال
The principle of ____________________ states that any methods and properties that other programmers do not need to access or know about should be hidden.
سؤال
A particular instance of an object ____________________ its methods and properties from a class-that is, it takes on the characteristics of the class on which it is based.
سؤال
____________________ refers to the creation of reusable software objects that can be easily incorporated into multiple programs.
سؤال
If you assign the current date and time to a variable, what is the value of that variable one hour later? Explain.
سؤال
Describe two ways of adding a method to an object.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/41
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 7: Using Object Oriented Javascript
1
The code for a method must be stored in an external function.
False
2
The ____ class contains methods and properties for manipulating the date and time.

A) Zone
B) Calendar
C) Date
D) Time
C
3
When working with a date, JavaScript stores the month as a ____.

A) value from 0-11
B) value from 1-12
C) two-letter abbreviation
D)three-letter abbreviation
A
4
____ refers to cleaning up, or reclaiming, memory that is reserved by a program.

A) Information hiding
B) Garbage collection
C) Data collection
D) Object hiding
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
5
A(n)____ function is a function that is used as the basis for a custom object.

A) constructor
B) object
C) instance
D) class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
6
The code (methods and statements)and data (variables and constants)contained in an encapsulated object are accessed through a(n)____.

A) black box
B) view
C) interface
D) template
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
7
The ____ class contains methods for manipulating numbers and properties that contain static values representing some of the numeric limitations in the JavaScript language.

A) Integer
B) Number
C) Math
D) Limits
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
8
To delete a specific property in a custom object, you use the ____ operator.

A) remove
B) cancel
C) erase
D) delete
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
9
The value of an object property can be another object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
10
The code  new Date() creates an empty Date object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
11
To execute the same statement or command block for all the properties within a custom object, you can use the ____ statement.

A) for/each
B) while/in
C) for/in
D) loop/in
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
12
You can use the Math  object directly in your programs without instantiating a new object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
13
The term ____ refers to information contained within variables or other types of storage structures.

A) data
B) object
C) class
D) instance
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
14
A(n)____ is an object that has been created from an existing class.

A) instance
B) interface
C) template
D) black box
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
15
You can create a function that will be used as an object method by referring to any object properties it contains with the ____ reference.

A) self
B) this
C) super
D) object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
16
The ____ class contains methods and properties for performing mathematical calculations in your programs.

A) Number
B) Integer
C) Function
D) Math
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
17
A(n)____ array is an array whose elements are referred to with an alphanumeric key instead of an index number.

A) parallel
B) class
C) associative
D) bidimensional
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
18
Objects are also called ____.

A) data
B) functions
C) methods
D) components
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
19
The ____ property is a built-in property that specifies the constructor from which an object was instantiated.

A) experiment
B) try
C) prototype
D) test
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
20
You can create an empty object by assigning a pair of empty braces to a variable  name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
21
Which Number class method can you use to convert a number to a string that is formatted with local numeric formatting style?

A)toFixed()
B)toLocaleString()
C)toPrecision()
D)toString()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
22
You can create an empty object by assigning a pair of empty __________ to a variable name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
23
Match between columns
Programming code and data that can be treated as an individual unit or component
object
Programming code and data that can be treated as an individual unit or component
associative
Programming code and data that can be treated as an individual unit or component
interface
Programming code and data that can be treated as an individual unit or component
class
Programming code and data that can be treated as an individual unit or component
sqrt()
Programming code and data that can be treated as an individual unit or component
toFixed()
Programming code and data that can be treated as an individual unit or component
literal
Programming code and data that can be treated as an individual unit or component
round( )
Programming code and data that can be treated as an individual unit or component
new Date()
Programming code and data that can be treated as an individual unit or component
method
Returns the square root of the specified value
object
Returns the square root of the specified value
associative
Returns the square root of the specified value
interface
Returns the square root of the specified value
class
Returns the square root of the specified value
sqrt()
Returns the square root of the specified value
toFixed()
Returns the square root of the specified value
literal
Returns the square root of the specified value
round( )
Returns the square root of the specified value
new Date()
Returns the square root of the specified value
method
A function assigned a name within a custom object
object
A function assigned a name within a custom object
associative
A function assigned a name within a custom object
interface
A function assigned a name within a custom object
class
A function assigned a name within a custom object
sqrt()
A function assigned a name within a custom object
toFixed()
A function assigned a name within a custom object
literal
A function assigned a name within a custom object
round( )
A function assigned a name within a custom object
new Date()
A function assigned a name within a custom object
method
Type of array that enables you to add object properties incorporating numbers
object
Type of array that enables you to add object properties incorporating numbers
associative
Type of array that enables you to add object properties incorporating numbers
interface
Type of array that enables you to add object properties incorporating numbers
class
Type of array that enables you to add object properties incorporating numbers
sqrt()
Type of array that enables you to add object properties incorporating numbers
toFixed()
Type of array that enables you to add object properties incorporating numbers
literal
Type of array that enables you to add object properties incorporating numbers
round( )
Type of array that enables you to add object properties incorporating numbers
new Date()
Type of array that enables you to add object properties incorporating numbers
method
The easiest way to declare a custom object
object
The easiest way to declare a custom object
associative
The easiest way to declare a custom object
interface
The easiest way to declare a custom object
class
The easiest way to declare a custom object
sqrt()
The easiest way to declare a custom object
toFixed()
The easiest way to declare a custom object
literal
The easiest way to declare a custom object
round( )
The easiest way to declare a custom object
new Date()
The easiest way to declare a custom object
method
Returns a value rounded to the nearest integer
object
Returns a value rounded to the nearest integer
associative
Returns a value rounded to the nearest integer
interface
Returns a value rounded to the nearest integer
class
Returns a value rounded to the nearest integer
sqrt()
Returns a value rounded to the nearest integer
toFixed()
Returns a value rounded to the nearest integer
literal
Returns a value rounded to the nearest integer
round( )
Returns a value rounded to the nearest integer
new Date()
Returns a value rounded to the nearest integer
method
Elements required for a source program to communicate with an object
object
Elements required for a source program to communicate with an object
associative
Elements required for a source program to communicate with an object
interface
Elements required for a source program to communicate with an object
class
Elements required for a source program to communicate with an object
sqrt()
Elements required for a source program to communicate with an object
toFixed()
Elements required for a source program to communicate with an object
literal
Elements required for a source program to communicate with an object
round( )
Elements required for a source program to communicate with an object
new Date()
Elements required for a source program to communicate with an object
method
Converts a number to a string using the number of decimal places specified
object
Converts a number to a string using the number of decimal places specified
associative
Converts a number to a string using the number of decimal places specified
interface
Converts a number to a string using the number of decimal places specified
class
Converts a number to a string using the number of decimal places specified
sqrt()
Converts a number to a string using the number of decimal places specified
toFixed()
Converts a number to a string using the number of decimal places specified
literal
Converts a number to a string using the number of decimal places specified
round( )
Converts a number to a string using the number of decimal places specified
new Date()
Converts a number to a string using the number of decimal places specified
method
A template, or blueprint, that serves as the basis for new objects
object
A template, or blueprint, that serves as the basis for new objects
associative
A template, or blueprint, that serves as the basis for new objects
interface
A template, or blueprint, that serves as the basis for new objects
class
A template, or blueprint, that serves as the basis for new objects
sqrt()
A template, or blueprint, that serves as the basis for new objects
toFixed()
A template, or blueprint, that serves as the basis for new objects
literal
A template, or blueprint, that serves as the basis for new objects
round( )
A template, or blueprint, that serves as the basis for new objects
new Date()
A template, or blueprint, that serves as the basis for new objects
method
Creates a Date object containing the current date
object
Creates a Date object containing the current date
associative
Creates a Date object containing the current date
interface
Creates a Date object containing the current date
class
Creates a Date object containing the current date
sqrt()
Creates a Date object containing the current date
toFixed()
Creates a Date object containing the current date
literal
Creates a Date object containing the current date
round( )
Creates a Date object containing the current date
new Date()
Creates a Date object containing the current date
method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
24
Which class requires you to use a constructor?

A) Math
B) Number
C) Date
D) Array
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
25
How can you get the full text of the day of the week based on information retrieved from a Date object?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
26
Describe two ways of adding properties to an object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
27
What is a sub-object? Provide an example.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
28
When creating an object using a literal, you separate multiple property-value pairs with ____.

A)colons
B)spaces
C)semicolons
D)commas
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
29
You can append the name of any Number class method or property to the name of an existing variable that contains a(n)____________________ value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
30
How do you declare a property within an object literal?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
31
Which method of the Math object rounds a value to the next lowest integer?

A)ceil()
B)floor()
C)max()
D)min()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
32
What are some of the benefits of encapsulation?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
33
Explain the difference between the Number and Math classes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
34
Why is JavaScript said to be an object-based programming language?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
35
What is garbage collection and how is it performed in JavaScript apps?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
36
To add a property to a constructor function, you must add a statement to the function body that uses the ____ keyword.

A)NaN
B)function
C)this
D)property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
37
The principle of ____________________ states that any methods and properties that other programmers do not need to access or know about should be hidden.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
38
A particular instance of an object ____________________ its methods and properties from a class-that is, it takes on the characteristics of the class on which it is based.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
39
____________________ refers to the creation of reusable software objects that can be easily incorporated into multiple programs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
40
If you assign the current date and time to a variable, what is the value of that variable one hour later? Explain.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
41
Describe two ways of adding a method to an object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.