Deck 8: Console Input and Output

ملء الشاشة (f)
exit full mode
سؤال
If you choose to use the method clone in your code,you must ___________ the clone method.
(a)overload
(b)encapsulate
(c)override
(d)protect
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A class that has at least one abstract method is called an:
(a)concrete class
(b)encapsulated class
(c)abstract class
(d)private class
سؤال
An abstract method cannot be modified by:
(a)public
(b)protected
(c)private
(d)none of the above
سؤال
Polymorphism refers to the ability to associate many meanings to one method through dynamic binding.
سؤال
Late binding refers to the method definition being associated with the method invocation when the method is invoked at run time.
سؤال
Assigning an object of an ancestor class to a descendent class is called:
(a)static binding
(b)dynamic binding
(c)upcasting
(d)downcasting
سؤال
A class with no abstract methods is called a
(a)concrete class
(b)encapsulated class
(c)abstract class
(d)private class
سؤال
The clone method has ________ parameters.
(a)zero
(b)one
(c)two
(d)three
سؤال
The clone method return type is:
(a)the same as the cloned object
(b)Object
(c)String
(d)none of the above
سؤال
Java allows an instance of an abstract class to be instantiated.
سؤال
Assigning an object of a derived class to a variable of a base class is called:
(a)static binding
(b)dynamic binding
(c)upcasting
(d)downcasting
سؤال
Java does not use late binding for methods marked as:
(a)final
(b)static
(c)private
(d)all of the above
سؤال
You cannot create an object using a/an:
(a)superclass constructor
(b)subclass constructor
(c)ancestor class constructor
(d)abstract class constructor
سؤال
__________ refers to the ability to associate many meanings to one method name by means of the late binding mechanism.
(a)Inheritance
(b)Encapsulation
(c)Polymorphism
(d)None of the above
سؤال
The principals of object oriented programming include:
(a)encapsulation
(b)inheritance
(c)polymorphism
(d)all of the above
سؤال
____________ refers to the process of associating a method definition with a method invocation.
(a)Binding
(b)Encapsulation
(c)Inheritance
(d)Polymorphism
سؤال
A method marked as final means the compiler uses ________ binding.
(a)dynamic
(b)early
(c)late
(d)none of the above
سؤال
Early binding enables the compiler to be more efficient.
سؤال
An abstract class must have the modifier ___________ included in the class heading.
(a)static
(b)abstract
(c)final
(d)private
سؤال
__________ binding refers to the method definition being associated with the method invocation when the code is compiled.
(a)Dynamic
(b)Late
(c)Early
(d)None of the above
سؤال
Java uses late binding with private methods,methods marked final,or static methods.
سؤال
What are the advantages of polymorphism?
سؤال
What is wrong with the following method definition?
public abstract void doSomething(int count)
سؤال
Implement the base class in the shoe hierarchy in number 8 above.
سؤال
Derive a class named Boots from the base class created in number 9 above.
سؤال
Explain the difference between early and late binding.
سؤال
What is polymorphism and how does it relate to late binding?
سؤال
The method clone has one parameter and should return a copy of the calling object.
سؤال
Why should the instanceOf operator be used in conjunction with downcasting?
سؤال
Write a decision statement to determine if an object should be downcast.
سؤال
Draw an inheritance hierarchy to represent a shoe object.The base class should have derived classes of Dress Shoes,Tennis Shoes and Boots.
سؤال
Derive a class named Tennis Shoes from the base class created in number 9 above.
سؤال
The final modifier is included before the definition of the method,then the method can be redefined in a derived class.
سؤال
Downcasting should be used only in situations where it makes sense.
سؤال
Derive a class named Dress Shoes from the base class created in number 9 above.
سؤال
The type of the variable naming an object determines which method names can be used in an invocation with that calling object.
سؤال
What is an abstract method?
سؤال
An abstract class is a class that has some methods without complete definitions.
سؤال
Describe the limitations of the copy constructor.
سؤال
An abstract method serves as a placeholder for a method that must be defined in all derived classes.
سؤال
Override the clone method inherited in the Tennis Shoes class created in number 11 above.
سؤال
Override the clone method inherited in the Dress Shoes class created in number 10 above.
سؤال
Override the clone method inherited in the Boots class created in number 12 above.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/43
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 8: Console Input and Output
1
If you choose to use the method clone in your code,you must ___________ the clone method.
(a)overload
(b)encapsulate
(c)override
(d)protect
C
2
A class that has at least one abstract method is called an:
(a)concrete class
(b)encapsulated class
(c)abstract class
(d)private class
C
3
An abstract method cannot be modified by:
(a)public
(b)protected
(c)private
(d)none of the above
C
4
Polymorphism refers to the ability to associate many meanings to one method through dynamic binding.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
5
Late binding refers to the method definition being associated with the method invocation when the method is invoked at run time.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
6
Assigning an object of an ancestor class to a descendent class is called:
(a)static binding
(b)dynamic binding
(c)upcasting
(d)downcasting
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
7
A class with no abstract methods is called a
(a)concrete class
(b)encapsulated class
(c)abstract class
(d)private class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
8
The clone method has ________ parameters.
(a)zero
(b)one
(c)two
(d)three
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
9
The clone method return type is:
(a)the same as the cloned object
(b)Object
(c)String
(d)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
10
Java allows an instance of an abstract class to be instantiated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
11
Assigning an object of a derived class to a variable of a base class is called:
(a)static binding
(b)dynamic binding
(c)upcasting
(d)downcasting
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
12
Java does not use late binding for methods marked as:
(a)final
(b)static
(c)private
(d)all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
13
You cannot create an object using a/an:
(a)superclass constructor
(b)subclass constructor
(c)ancestor class constructor
(d)abstract class constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
14
__________ refers to the ability to associate many meanings to one method name by means of the late binding mechanism.
(a)Inheritance
(b)Encapsulation
(c)Polymorphism
(d)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
15
The principals of object oriented programming include:
(a)encapsulation
(b)inheritance
(c)polymorphism
(d)all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
16
____________ refers to the process of associating a method definition with a method invocation.
(a)Binding
(b)Encapsulation
(c)Inheritance
(d)Polymorphism
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
17
A method marked as final means the compiler uses ________ binding.
(a)dynamic
(b)early
(c)late
(d)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
18
Early binding enables the compiler to be more efficient.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
19
An abstract class must have the modifier ___________ included in the class heading.
(a)static
(b)abstract
(c)final
(d)private
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
20
__________ binding refers to the method definition being associated with the method invocation when the code is compiled.
(a)Dynamic
(b)Late
(c)Early
(d)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
21
Java uses late binding with private methods,methods marked final,or static methods.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
22
What are the advantages of polymorphism?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
23
What is wrong with the following method definition?
public abstract void doSomething(int count)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
24
Implement the base class in the shoe hierarchy in number 8 above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
25
Derive a class named Boots from the base class created in number 9 above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
26
Explain the difference between early and late binding.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
27
What is polymorphism and how does it relate to late binding?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
28
The method clone has one parameter and should return a copy of the calling object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
29
Why should the instanceOf operator be used in conjunction with downcasting?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
30
Write a decision statement to determine if an object should be downcast.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
31
Draw an inheritance hierarchy to represent a shoe object.The base class should have derived classes of Dress Shoes,Tennis Shoes and Boots.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
32
Derive a class named Tennis Shoes from the base class created in number 9 above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
33
The final modifier is included before the definition of the method,then the method can be redefined in a derived class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
34
Downcasting should be used only in situations where it makes sense.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
35
Derive a class named Dress Shoes from the base class created in number 9 above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
36
The type of the variable naming an object determines which method names can be used in an invocation with that calling object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
37
What is an abstract method?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
38
An abstract class is a class that has some methods without complete definitions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
39
Describe the limitations of the copy constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
40
An abstract method serves as a placeholder for a method that must be defined in all derived classes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
41
Override the clone method inherited in the Tennis Shoes class created in number 11 above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
42
Override the clone method inherited in the Dress Shoes class created in number 10 above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
43
Override the clone method inherited in the Boots class created in number 12 above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.