Deck 11: Classes and Object-Oriented Programming

ملء الشاشة (f)
exit full mode
سؤال
Object-oriented programming allows us to hide the object's data attributes from code that is outside the object.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
In a UML diagram, the middle section holds the list of the class's methods.
سؤال
What type of method provides a safe way for code outside a class to retrieve the values of attributes, without exposing the attributes in a way that they could be changed by the code outside the method?

A) Accessor
B) Mutator
C) Setter
D) Class
سؤال
A mutator method has no control over the way that a class's data attributes are modified.
سؤال
Which section in the UML holds the list of the class's data attributes?

A) first
B) Second
C) Third
D) fourth
سؤال
A(n) _____ is a set of real-world objects, parties, and major events related to the problem.

A) class
B) problem domain
C) object
D) instance
سؤال
Procedures operate on data items that are separate from the procedures.
سؤال
What are the procedures that an object performs called?

A) Methods
B) Actions
C) Modules
D) Instances
سؤال
What is, conceptually, a self-contained unit that consists of data attributes and methods that operate on the data attributes?

A) Class
B) Object
C) Instance
D) Module
سؤال
What type of programming contains class definitions?

A) Procedural
B) Object
C) Object-oriented
D) Modular
سؤال
What is another name for the accessor methods?

A) Setters
B) Getters
C) Instances
D) Attributes
سؤال
When a method is called, what does Python make to reference the specific object on which the method is supposed to operate?

A) state variable
B) self parameter
C) object data
D) init procedure
سؤال
What does the acronym UML stand for?

A) Unified Modeling Language
B) United Modeling Language
C) Unified Model Language
D) United Model Language
سؤال
The instances of a class share the data attributes in the class.
سؤال
Which method is automatically executed when an instance of the class is created in memory?

A) __state__
B) __obj__
C) __str__
D) __init__
سؤال
Which section in the UML holds the list of the class's methods?

A) first
B) Second
C) Third
D) fourth
سؤال
What is another name for the mutator methods?

A) Setters
B) Getters
C) Instances
D) Attributes
سؤال
What is the special name given to the method that returns a string containing the object's state?

A) __state__
B) __obj__
C) __str__
D) __init__
سؤال
What attributes belong to a specific instance of the class?

A) Instance
B) Self
C) Object
D) Data
سؤال
What is the combining of data and code in a single object known as?

A) Modularity
B) Instantiation
C) Encapsulation
D) Objectification
سؤال
An object's _______________ is simply the values of the object's attributes at any given moment.
سؤال
A(n) _______________ is code that specifies the data attributes and methods for a particular type of object.
سؤال
In _______________ programming, the programming is centered on objects that are created from abstract data types that encapsulate data and functions together.
سؤال
_______________ programming is a method of writing software that centers on the actions that take place in a program.
سؤال
The _______________ attributes are created by the self parameter and they belong to a specific instance of the class.
سؤال
A class definition is stored in the library so that it can be imported into any program.
سؤال
_______________ provides a set of standard diagrams for graphically depicting object-oriented systems.
سؤال
The self parameter is required in every method of a class.
سؤال
Each object that is created from a class is called a(n) _______________ of the class.
سؤال
An object is a stand-alone program but is used by programs that need its service.
سؤال
A class might be thought of as a 'blueprint' that an object may be created from.
سؤال
A method that returns a value from a class's attribute but does not change it is known as a(n) _______________ method.
سؤال
A class _______________ is a set of statements that define a class's methods and data attributes.
سؤال
The self parameter need not be named self, but it is strongly recommended to conform with standard practice.
سؤال
A(n) _______________ method in a class initializes an object's data attributes.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/35
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 11: Classes and Object-Oriented Programming
1
Object-oriented programming allows us to hide the object's data attributes from code that is outside the object.
True
2
In a UML diagram, the middle section holds the list of the class's methods.
False
3
What type of method provides a safe way for code outside a class to retrieve the values of attributes, without exposing the attributes in a way that they could be changed by the code outside the method?

A) Accessor
B) Mutator
C) Setter
D) Class
A
4
A mutator method has no control over the way that a class's data attributes are modified.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
5
Which section in the UML holds the list of the class's data attributes?

A) first
B) Second
C) Third
D) fourth
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
6
A(n) _____ is a set of real-world objects, parties, and major events related to the problem.

A) class
B) problem domain
C) object
D) instance
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
7
Procedures operate on data items that are separate from the procedures.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
8
What are the procedures that an object performs called?

A) Methods
B) Actions
C) Modules
D) Instances
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
9
What is, conceptually, a self-contained unit that consists of data attributes and methods that operate on the data attributes?

A) Class
B) Object
C) Instance
D) Module
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
10
What type of programming contains class definitions?

A) Procedural
B) Object
C) Object-oriented
D) Modular
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
11
What is another name for the accessor methods?

A) Setters
B) Getters
C) Instances
D) Attributes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
12
When a method is called, what does Python make to reference the specific object on which the method is supposed to operate?

A) state variable
B) self parameter
C) object data
D) init procedure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
13
What does the acronym UML stand for?

A) Unified Modeling Language
B) United Modeling Language
C) Unified Model Language
D) United Model Language
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
14
The instances of a class share the data attributes in the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
15
Which method is automatically executed when an instance of the class is created in memory?

A) __state__
B) __obj__
C) __str__
D) __init__
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
16
Which section in the UML holds the list of the class's methods?

A) first
B) Second
C) Third
D) fourth
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
17
What is another name for the mutator methods?

A) Setters
B) Getters
C) Instances
D) Attributes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
18
What is the special name given to the method that returns a string containing the object's state?

A) __state__
B) __obj__
C) __str__
D) __init__
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
19
What attributes belong to a specific instance of the class?

A) Instance
B) Self
C) Object
D) Data
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
20
What is the combining of data and code in a single object known as?

A) Modularity
B) Instantiation
C) Encapsulation
D) Objectification
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
21
An object's _______________ is simply the values of the object's attributes at any given moment.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
22
A(n) _______________ is code that specifies the data attributes and methods for a particular type of object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
23
In _______________ programming, the programming is centered on objects that are created from abstract data types that encapsulate data and functions together.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
24
_______________ programming is a method of writing software that centers on the actions that take place in a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
25
The _______________ attributes are created by the self parameter and they belong to a specific instance of the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
26
A class definition is stored in the library so that it can be imported into any program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
27
_______________ provides a set of standard diagrams for graphically depicting object-oriented systems.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
28
The self parameter is required in every method of a class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
29
Each object that is created from a class is called a(n) _______________ of the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
30
An object is a stand-alone program but is used by programs that need its service.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
31
A class might be thought of as a 'blueprint' that an object may be created from.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
32
A method that returns a value from a class's attribute but does not change it is known as a(n) _______________ method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
33
A class _______________ is a set of statements that define a class's methods and data attributes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
34
The self parameter need not be named self, but it is strongly recommended to conform with standard practice.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
35
A(n) _______________ method in a class initializes an object's data attributes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.