Deck 11: Inheritance
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/30
العب
ملء الشاشة (f)
Deck 11: Inheritance
1
The class at the highest level in a class diagram
A)is an abstract class.
B)points directly to all of its subclasses.
C)has definitions for all methods in the class hierarchy.
D)is the most general class in the class diagram.
A)is an abstract class.
B)points directly to all of its subclasses.
C)has definitions for all methods in the class hierarchy.
D)is the most general class in the class diagram.
D
2
Which of the following is not an example of a generalization/specialization relationship?
A)vehicle/car
B)furniture/chair
C)food/groceries
D)building/fire station
A)vehicle/car
B)furniture/chair
C)food/groceries
D)building/fire station
C
3
Another name for a subclass is a(n)
A)described class.
B)inherited class.
C)derived class.
D) parent class.
A)described class.
B)inherited class.
C)derived class.
D) parent class.
C
4
If two methods in a class hierarchy have the same name,
A)the classes that contain them cannot be included in the same program.
A)the method name must be appended to the class name on invokation.
B)one method must have fewer parameters than the other to ensure uniqueness.
D)an object name must precede the method name when either method is invoked.
A)the classes that contain them cannot be included in the same program.
A)the method name must be appended to the class name on invokation.
B)one method must have fewer parameters than the other to ensure uniqueness.
D)an object name must precede the method name when either method is invoked.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
5
How is generalization/specialization represented on a UML class diagram?
A)a solid line.
B)an unfilled arrow.
C)a filled diamond.
D)a dashed line.
A)a solid line.
B)an unfilled arrow.
C)a filled diamond.
D)a dashed line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
6
A tennis player is a kind of athlete is an example of
A)generalization/specialization.
B)class hierarchy.
C)polymorphism.
D)inheritance.
A)generalization/specialization.
B)class hierarchy.
C)polymorphism.
D)inheritance.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
7
Inheritance is
A)a mechanism that uses generalization/specialization relationships.
B)a mechanism for relating classes and objects.
C)a relationship that establishes levels in a class hierarchy.
D)a mechanism to share identifications and descriptions.
A)a mechanism that uses generalization/specialization relationships.
B)a mechanism for relating classes and objects.
C)a relationship that establishes levels in a class hierarchy.
D)a mechanism to share identifications and descriptions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
8
Inheritance takes advantage of an existing generalization/specialization relationship.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
9
Classes that are not abstract classes are sometimes referred to as
A)base classes.
B)concrete classes.
C)superclasses.
D)inherited classes.
A)base classes.
B)concrete classes.
C)superclasses.
D)inherited classes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
10
Which of the following people was not involved in the definition of UML?
A)Harlan Mills
B)Ivar Jacobson
C)Grady Booch
D)Jim Rumbaugh
A)Harlan Mills
B)Ivar Jacobson
C)Grady Booch
D)Jim Rumbaugh
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
11
A subclass cannot contain a data member that is not in its base class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
12
An abstract class
A)has at least one method that is identified but not defined.
B) is defined in each class in which it appears.
C)has no constructor method.
D)has at least one data member that is not referenced during processing.
A)has at least one method that is identified but not defined.
B) is defined in each class in which it appears.
C)has no constructor method.
D)has at least one data member that is not referenced during processing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
13
A polymorphic method
A)has multiple implementations within the same class definition.
B)is uniquely identified by the data types of its arguments.
C)can be used in a subclass if it's not used in a base class.
D)has the same name as another method within the same class hierarchy.
A)has multiple implementations within the same class definition.
B)is uniquely identified by the data types of its arguments.
C)can be used in a subclass if it's not used in a base class.
D)has the same name as another method within the same class hierarchy.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
14
A subclass can contain a new design of an inherited method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
15
When two constructors are given in a class,they execute in sequence during processing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
16
The process of reimplementing in a subclass a method from the base class is called
A)overriding.
B)overloading.
C)polymorphism.
D)inheritance.
A)overriding.
B)overloading.
C)polymorphism.
D)inheritance.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
17
What is another name for an "is-a"relationship?
A)composition
B)abstraction
C)generalization/specialization
D)kind-of/example
A)composition
B)abstraction
C)generalization/specialization
D)kind-of/example
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
18
When a subclass is created,processing proceeds as if
A)the subclass was itself a base class.
B)a call to the constructor of the base class were the first statement in the constructor for the subclass.
C)the subclass was the class at the top of the class hierarchy.
D)a call to the subclass's constructor had already occurred.
A)the subclass was itself a base class.
B)a call to the constructor of the base class were the first statement in the constructor for the subclass.
C)the subclass was the class at the top of the class hierarchy.
D)a call to the subclass's constructor had already occurred.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
19
A base class may also be called a(n)
A)superclass.
B)subclass.
C)derived class.
D)existent class.
A)superclass.
B)subclass.
C)derived class.
D)existent class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
20
A subclass cannot inherit methods from another class at its same level.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
21
Developers often use inheritance to simplify and shorten their implementation tasks.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
22
A class definition may include a constructor or a destructor,but will not reasonably include both.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
23
Polymorphism is used extensively in commercial programming.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
24
A single driver program may instantiate two or more instances of the same class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
25
Structured programming control structures do not apply in designing a class when inheritance is used.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
26
No objects can be created of a base class that is an abstract class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
27
A single method invocation may contain constants or variables,but not both.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
28
When two classes have a generalization/specialization relationship,the more specific class may contain additional information.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
29
A single method can return values that are of different data types.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
30
A method in a subclass can invoke a method in its base class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck