Deck 7: Object-Oriented Programming

ملء الشاشة (f)
exit full mode
سؤال
For a language to be considered object-oriented,it must support polymorphism,____,and encapsulation.

A) objects
B) class users
C) instantiation
D) inheritance
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Declaring a class creates actual objects.
سؤال
A class ____ describes what attributes its objects will have and what those objects will be able to do.

A) profile
B) definition
C) interface
D) signature
سؤال
____ programming is a style of programming that focuses on an application's data and the methods you need to manipulate that data.

A) Object-oriented
B) Functional
C) Object
D) Method
سؤال
A program or class that instantiates objects of another prewritten class is a ____ or class user.

A) class slave
B) class object
C) class master
D) class client
سؤال
For a language to be considered object-oriented,it must include ____.

A) get and set methods
B) classes and objects
C) instance variables and methods
D) variables and methods
سؤال
Polymorphism is the feature of languages that allows the same word or symbol to be interpreted correctly in different situations based on the context.
سؤال
Object-oriented programming uses few of the concepts you are familiar with from modular,procedural programming.
سؤال
It is possible to create a lengthy chain of inheritance.
سؤال
A(n)____ is a term that describes a group of objects with common properties.

A) object
B) interface
C) class
D) method
سؤال
The syntax used to declare a class differs among programming languages.
سؤال
An ____ of a class is an existing object of a class.

A) example
B) occurrence
C) instance
D) illustration
سؤال
When an object is created it is ____.

A) instantiatied
B) invoked
C) involved
D) instanced
سؤال
A class definition can contain four parts.
سؤال
When you program in object-oriented languages,you frequently create classes from which objects will be instantiated.
سؤال
Although at first,OOP seems to add a layer of complexity to programming logic,after you master it,understanding program logic and working with programs become easier.
سؤال
Usually,data fields are public and methods are private.
سؤال
Each data variable that exists for every object is called a(n)____ variable.

A) instance
B) class
C) program
D) numeric
سؤال
In object-oriented terminology,a(n)____ is one concrete example of a class.

A) entity
B) interface
C) method
D) object
سؤال
In object-oriented design,you usually want any outside programs or methods to be able to alter your class's data fields at any time to ensure that the program works.
سؤال
Objects are ____,meaning one object can inherit characteristics from another,like objects in the real world.

A) encapsulated
B) extensible
C) invisible
D) definable
سؤال
____ methods change values within an object.

A) Transformer
B) Change
C) Mutator
D) Get
سؤال
A ____ definition is just an abstract description of what an object will be like if any objects are ever actually instantiated.

A) class
B) prototype
C) accessor
D) signature
سؤال
____ methods assign values to the fields of any objects created from the class.

A) Accessor
B) Set
C) Change
D) Get
سؤال
A method ____ the version in the base class when it has the same name and parameter list.

A) overhauls
B) redefines
C) overrides
D) overwhelms
سؤال
Each method that each object can use is an ____ method.

A) invoke
B) instance
C) enabled
D) included
سؤال
Because the plus symbol (+)has diverse meanings based on context,it is ____.

A) overdefined
B) defined
C) polyclassist
D) polymorphic
سؤال
Object-oriented programmers usually specify that their data fields will have ____.

A) public access
B) private access
C) inheritance
D) signatures
سؤال
In some languages,a derived class can have more than one parent.This capability is called ____.

A) multiple inheritance
B) multiple heritage
C) multiplicity
D) multiple lineage
سؤال
The term ____ implies that the type's data can be accessed only through methods.

A) abstract type
B) data type
C) abstract data type
D) object data type
سؤال
By ____ the data,you pass one argument.

A) encapsulating
B) hiding
C) exposing
D) internalizing
سؤال
A class that inherits from a base class is a ____ class.

A) super
B) lower
C) derived
D) parent
سؤال
According to the principle of ____,data fields should usually be private,and a client application should be able to access them only through the public interfaces,that is,through the class's public methods.

A) function hiding
B) data hiding
C) data encapsulation
D) data definition
سؤال
An ____ is a term that defines the type of access that outside classes will have to the attribute or method.

A) access specifier
B) accessor
C) access interface
D) accessor method
سؤال
____ is the ability to create classes that take on the attributes and methods of existing classes,but with more specific features.

A) Heritage
B) Instantiation
C) Heredity
D) Inheritance
سؤال
Each object's features are separate or ____ from all others.

A) refined
B) abstracted
C) encapsulated
D) insulated
سؤال
____ describes a language's ability to process objects differently depending on each object's data type.

A) Polysymbolism
B) Polymorphism
C) Polyflexible
D) Polyclassism
سؤال
____ methods pass the data stored in a field back to a client program.

A) Mutator
B) Send
C) Set
D) Get
سؤال
When you create a new class using inheritance,you ____ the existing class.

A) stretch
B) expand
C) extend
D) broaden
سؤال
When you use inheritance you can reuse well-established features of ____.

A) parent classes
B) derived classes
C) child classes
D) subclasses
سؤال
Identify an object that might belong to the Automobile class:

A) string name
B) num price
C) Toyota
D) jet
سؤال
What features must a programming language have for it to be considered an object-oriented language?
سؤال
The following pseudocode is not working correctly.Which answer shows the corrected code? start
Declarations
Product myApple
MyApple.setName = "Gala"
Output "My favorite apple is ",myApple.getName()
Stop

A) Product.setName = "Gala"
B) myApple.setName("Gala")
C) Product = "Gala"
D) Product.setName("Gala")
سؤال
Rewrite the following pseudocode making the appropriate corrections.
start
Declarations
Employee myAssistant
myAssistant.setName("Reynolds")
myAssistant.setPayRate = 16.75
output "My assistant ",Employee.getName(),
" makes ",Employee.getPayRate(),
" per hour"
stop
سؤال
What is NOT true about the following pseudocode? class Salesperson inheritsFrom Employee

A) Every Salesperson has all the attributes of an Employee
B) Salesperson is a derived class
C) Every Salesperson object can use all Employee methods
D) Salesperson is a base class
سؤال
Write the pseudocode for a class named Product that holds a product name.Include methods to get and set the value for each data field.
سؤال
The following pseudocode is not working correctly.Which answer shows the corrected code? class Product
Fields
String name
Methods
Void setName(string prodName)
Name = prodName
Return
String getName()
Return
EndClass

A) string getName()
Return name
B) void setName(prodName)
C) string getName(prodName)
Return name
D) string getName(prodName)
Return
سؤال
Which declaration instantiates an object of the Automobile class?

A) myFord Automobile
B) Automobile myFord
C) Transportation myFord
D) Tranportation Automobile
سؤال
List the three parts of a class definition.
سؤال
Why do object-oriented programmers usually specify that their data fields will have private access?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 7: Object-Oriented Programming
1
For a language to be considered object-oriented,it must support polymorphism,____,and encapsulation.

A) objects
B) class users
C) instantiation
D) inheritance
D
2
Declaring a class creates actual objects.
False
3
A class ____ describes what attributes its objects will have and what those objects will be able to do.

A) profile
B) definition
C) interface
D) signature
B
4
____ programming is a style of programming that focuses on an application's data and the methods you need to manipulate that data.

A) Object-oriented
B) Functional
C) Object
D) Method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
A program or class that instantiates objects of another prewritten class is a ____ or class user.

A) class slave
B) class object
C) class master
D) class client
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
For a language to be considered object-oriented,it must include ____.

A) get and set methods
B) classes and objects
C) instance variables and methods
D) variables and methods
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
Polymorphism is the feature of languages that allows the same word or symbol to be interpreted correctly in different situations based on the context.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
Object-oriented programming uses few of the concepts you are familiar with from modular,procedural programming.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
It is possible to create a lengthy chain of inheritance.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
A(n)____ is a term that describes a group of objects with common properties.

A) object
B) interface
C) class
D) method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
The syntax used to declare a class differs among programming languages.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
An ____ of a class is an existing object of a class.

A) example
B) occurrence
C) instance
D) illustration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
When an object is created it is ____.

A) instantiatied
B) invoked
C) involved
D) instanced
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
A class definition can contain four parts.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
When you program in object-oriented languages,you frequently create classes from which objects will be instantiated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
Although at first,OOP seems to add a layer of complexity to programming logic,after you master it,understanding program logic and working with programs become easier.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
Usually,data fields are public and methods are private.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
Each data variable that exists for every object is called a(n)____ variable.

A) instance
B) class
C) program
D) numeric
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
In object-oriented terminology,a(n)____ is one concrete example of a class.

A) entity
B) interface
C) method
D) object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
In object-oriented design,you usually want any outside programs or methods to be able to alter your class's data fields at any time to ensure that the program works.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
Objects are ____,meaning one object can inherit characteristics from another,like objects in the real world.

A) encapsulated
B) extensible
C) invisible
D) definable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
____ methods change values within an object.

A) Transformer
B) Change
C) Mutator
D) Get
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
A ____ definition is just an abstract description of what an object will be like if any objects are ever actually instantiated.

A) class
B) prototype
C) accessor
D) signature
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
____ methods assign values to the fields of any objects created from the class.

A) Accessor
B) Set
C) Change
D) Get
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
A method ____ the version in the base class when it has the same name and parameter list.

A) overhauls
B) redefines
C) overrides
D) overwhelms
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
Each method that each object can use is an ____ method.

A) invoke
B) instance
C) enabled
D) included
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
Because the plus symbol (+)has diverse meanings based on context,it is ____.

A) overdefined
B) defined
C) polyclassist
D) polymorphic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
Object-oriented programmers usually specify that their data fields will have ____.

A) public access
B) private access
C) inheritance
D) signatures
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
In some languages,a derived class can have more than one parent.This capability is called ____.

A) multiple inheritance
B) multiple heritage
C) multiplicity
D) multiple lineage
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
The term ____ implies that the type's data can be accessed only through methods.

A) abstract type
B) data type
C) abstract data type
D) object data type
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
By ____ the data,you pass one argument.

A) encapsulating
B) hiding
C) exposing
D) internalizing
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
A class that inherits from a base class is a ____ class.

A) super
B) lower
C) derived
D) parent
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
According to the principle of ____,data fields should usually be private,and a client application should be able to access them only through the public interfaces,that is,through the class's public methods.

A) function hiding
B) data hiding
C) data encapsulation
D) data definition
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
An ____ is a term that defines the type of access that outside classes will have to the attribute or method.

A) access specifier
B) accessor
C) access interface
D) accessor method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
____ is the ability to create classes that take on the attributes and methods of existing classes,but with more specific features.

A) Heritage
B) Instantiation
C) Heredity
D) Inheritance
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
Each object's features are separate or ____ from all others.

A) refined
B) abstracted
C) encapsulated
D) insulated
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
____ describes a language's ability to process objects differently depending on each object's data type.

A) Polysymbolism
B) Polymorphism
C) Polyflexible
D) Polyclassism
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
____ methods pass the data stored in a field back to a client program.

A) Mutator
B) Send
C) Set
D) Get
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
When you create a new class using inheritance,you ____ the existing class.

A) stretch
B) expand
C) extend
D) broaden
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
When you use inheritance you can reuse well-established features of ____.

A) parent classes
B) derived classes
C) child classes
D) subclasses
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
Identify an object that might belong to the Automobile class:

A) string name
B) num price
C) Toyota
D) jet
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
What features must a programming language have for it to be considered an object-oriented language?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
The following pseudocode is not working correctly.Which answer shows the corrected code? start
Declarations
Product myApple
MyApple.setName = "Gala"
Output "My favorite apple is ",myApple.getName()
Stop

A) Product.setName = "Gala"
B) myApple.setName("Gala")
C) Product = "Gala"
D) Product.setName("Gala")
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
Rewrite the following pseudocode making the appropriate corrections.
start
Declarations
Employee myAssistant
myAssistant.setName("Reynolds")
myAssistant.setPayRate = 16.75
output "My assistant ",Employee.getName(),
" makes ",Employee.getPayRate(),
" per hour"
stop
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
What is NOT true about the following pseudocode? class Salesperson inheritsFrom Employee

A) Every Salesperson has all the attributes of an Employee
B) Salesperson is a derived class
C) Every Salesperson object can use all Employee methods
D) Salesperson is a base class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
Write the pseudocode for a class named Product that holds a product name.Include methods to get and set the value for each data field.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
The following pseudocode is not working correctly.Which answer shows the corrected code? class Product
Fields
String name
Methods
Void setName(string prodName)
Name = prodName
Return
String getName()
Return
EndClass

A) string getName()
Return name
B) void setName(prodName)
C) string getName(prodName)
Return name
D) string getName(prodName)
Return
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
Which declaration instantiates an object of the Automobile class?

A) myFord Automobile
B) Automobile myFord
C) Transportation myFord
D) Tranportation Automobile
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
List the three parts of a class definition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
Why do object-oriented programmers usually specify that their data fields will have private access?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.