Deck 10: Object-Oriented Programming: Inheritance

ملء الشاشة (f)
exit full mode
سؤال
A method must be declared __________ for it to be overridden by derived classes.

A)Overrides
B)Overridable
C)Virtual
D)None of the above
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
All classes in Visual Basic have Object as either a direct or indirect base class.
سؤال
Which of the following pairs demonstrates the "is-a" relationship?

A)car,engine
B)book,table of contents
C)baseball,sport
D)None of the above
سؤال
To avoid duplicating code (and possibly errors),use ________,rather than ________.

A)inheritance,the "copy-and-paste" approach
B)the "copy-and-paste" approach,inheritance
C)a class that explicitly extends Object,a class that does not extend Object
D)a class that does not extend Object, a class that explicitly extends Object
سؤال
__________ is a form of xe "code reuse"xe "software reuse"software reuse in which a new class is created quickly and easily by absorbing an existing class's members and customizing them with new or modified capabilities.

A)Interfacing
B)Inheritance
C)Encapsulating
D)Polymorphism
سؤال
A base class's constructors are inherited into its derived classes.
سؤال
Which of the following could be a base class for class Computer?

A)machine
B)hard-drive
C)software
D)keyboard
سؤال
An advantage of inheritance is that:

A)all methods can be inherited
B)all instance variables can be uniformly accessed by base classes and derived classes
C)Objects of a derived class can be treated as objects of their base class
D)None of the above.
سؤال
A base class may have only one derived class.
سؤال
A derived class can add its own instance variables,Shared variables,properties and methods,and it can customize methods and properties it inherits.
سؤال
Every class in Visual Basic except __________ extends an existing class.

A)Integer
B)Object
C)Type
D)Class
سؤال
A base class is more specific than its derived class and represents a more specialized group of objects.
سؤال
Inheritance is represented by a(n)_________ relationship.

A)"uses"
B)"is-a"
C)"has-a"
D)None of the above.
سؤال
Which of the following is not a base/derived class relationship?

A)Ford/Taurus
B)University/Boston University
C)Sailboat/Tugboat
D)Country/USA
سؤال
When creating a class,rather than declaring completely new members,you can designate that the new class inherits the members of an existing class.The existing class is called the __________ class,and the new class is the __________ class.

A)derived,base
B)root,child
C)sub,super
D)base,derived
سؤال
A class inherited from two or more levels up in the hierarchy is known as a(n) .

A)indirect base class
B)direct base class
C)superclass
D)None of the above
سؤال
The default implementation of method ToString of Object returns a String representing ________.

A)the object's type
B)the object class name
C)namespace_name.object_class_name
D)None of the above
سؤال
Polymorphism enables you to conveniently xe "program in the general"program "in the general" rather than "xe "program in the specific"in the specific."
سؤال
Which of the following pairs demonstrates the "has-a" relationship?

A)car,vehicle
B)house,window
C)teacher,person
D)None of the above
سؤال
The class hierarchy begins with class __________.

A)Object
B)Point
C)Root
D)Base
سؤال
When a program creates a derived-class object,the Object constructor is the last constructor called and the first whose body finishes executing.
سؤال
Polymorphism allows for specifics to be dealt with during:

A)execution
B)compilation
C)programming
D)debugging
سؤال
How can a derived class constructor ccall a base class constructor?

A)implicitly
B)explicitly
C)a and b
D)the derived class cannot call the base class constructor
سؤال
For which of the following would polymorphism not provide a clean solution?

A)A billing program where there is a variety of clients who are billed with different fee structures.
B)A maintenance log program where a variety of machine data is collected and maintenance schedules are produced for each machine based on the data collected.
C)A program to compute a 5% savings account interest for bank clients.
D)An IRS program that maintains information on a variety of taxpayers and determines who to audit based on criteria for classes of taxpayers.
سؤال
In practice,derived classes should depend only on the base-class services (that is,Private methods and properties)and not on the base-class data implementation.
سؤال
To call the base-class default constructor explicitly,the call to a base-class constructor must be the first statement in the derived-class-constructor definition.
سؤال
Which statement is true when a base class has Protected instance variables?

A)A derived class object can assign an invalid value to the base class's Protected instance variables.
B)Derived class methods can depend on the base class's Protected data implementation.
C)Derived classes would need to be modified if the base class's Protected data implementation changes.
D)All of the above.
سؤال
When a derived-class member overrides a base-class member,the base-class member can be accessed from the derived-class by using the Visual Basic keyword .

A)MyBase
B)Top
C)Super
D)None of the above
سؤال
When a request is made to use a derived-class-object method through a base-class reference,Visual Basic polymorphically chooses the correct overridden method in the derived class that is associated with the object.
سؤال
Polymorphism involves:

A)the same message sent to a variety of objects of types related by inheritance
B)a specific message sent to each specific object
C)different messages sent to one object
D)None of the above.
سؤال
The first task of any base class's constructor is to call its derived class's constructor.
سؤال
With Protected instance variables in the base class,all the derived classes of the base class may need to be modified if the base-class implementation changes.In such a case,the software is said to be non-modifiable,because a small change in the base class can "break" derived-class implementations.
سؤال
Polymorphism allows the addition of classes providing they were at least considered during program development.
سؤال
Consider the classes below: <strong>Consider the classes below:   Which of the statements below is false?</strong> A)Both variables a and b are instance variables. B)After the constructor for Class B executes,the variable a will have the value 7. C)After the constructor for Class B executes,the variable b will have the value 8. D)A reference to an object of Class A can be treated as a reference to an object of Class B. <div style=padding-top: 35px>
Which of the statements below is false?

A)Both variables a and b are instance variables.
B)After the constructor for Class B executes,the variable a will have the value 7.
C)After the constructor for Class B executes,the variable b will have the value 8.
D)A reference to an object of Class A can be treated as a reference to an object of Class B.
سؤال
When a base class method is overridden in a derived class,it is common to have the derived class version call the base class version and then do some additional work.
سؤال
Base class methods with this level of access cannot be called from derived classes.

A)Private
B)Public
C)Protected
D)None of the above
سؤال
A base class's method that's overridden in a derived class will be executed implicitly when the derived class's method is called.
سؤال
The Protected members of a base class may be accessed in their class or any classes derived from that base class.
سؤال
When a derived class constructor calls its base class constructor,what happens if the base class's constructor does not assign a value to one of its instance variables?

A)a syntax error occurs
B)a compile-time error occurs
C)a run-time error occurs
D)the instance variables are initialized to their default values
سؤال
Private fields of a base class can be accessed in a derived class

A)by calling Private methods declared in the base class
B)by calling Public or Protected methods declared in the base class
C)directly
D)All of the above
سؤال
An abstract class cannot have instance data and non-abstract methods.
سؤال
Classes which may be instantiated are ___________ classes.

A)instance
B)concrete
C)abstract
D)None of the above
سؤال
Abstract methods and properties do not provide an implementation.
سؤال
The use of polymorphism helps promote software extensibility.
سؤال
All methods in an abstract class are abstract.
سؤال
Which answer best describes how many interfaces a class can implement?

A)0
B)1
C)1 or more
D)0 or more
سؤال
You may define implementations for abstract methods to act as a default.
سؤال
The MustOverride keyword has the same effect as the Overridable keyword.
سؤال
Assigning a derived class reference to a base class variable is safe:

A)because the derived class has an object of its base class.
B)because the derived class is an object of its base class.
C)only when the base class is abstract.
D)only when the base class is concrete.
سؤال
Objects of abstract base classes can be instantiated.
سؤال
Concrete classes provide implementations for at least one of the methods and properties they define.
سؤال
Abstract classes are classes which may not be:

A)inherited
B)accessed by derived-classes
C)instantiated
D)None of the above.
سؤال
Which of the following statements about MustInherit base classes is true?

A)MustInherit base classes may contain data.
B)MustInherit base classes may not contain implementations of methods.
C)MustInherit base classes must declare all methods as MustOverride.
D)MustInherit base classes must declare all data members not given values as MustOverride.
سؤال
Once a class implements an interface,all objects of that class have a(n)__________ relationship with the interface type.

A)has a
B)equals
C)is a
D)composition
سؤال
Consider the MustInherit base classes below: <strong>Consider the MustInherit base classes below:   Any concrete subclass that inherits class Foo:</strong> A)Must implement a method called Calculate. B)Will not be able to access the instance variable a. C)Will not be able to instantiate an object of class Foo. D)All of the above. <div style=padding-top: 35px>
Any concrete subclass that inherits class Foo:

A)Must implement a method called Calculate.
B)Will not be able to access the instance variable a.
C)Will not be able to instantiate an object of class Foo.
D)All of the above.
سؤال
A class with MustOverride methods does not necessarily have to be a MustInherit class.
سؤال
Attempting to instantiate an object of an abstract class is a logic error.
سؤال
The _________ keyword is used to define methods within a MustInherit class that must be implemented in a derived class for that derived class to be concrete.

A)Overridable
B)Abstract
C)MustOverride
D)MustImplement.
سؤال
Polymorphism allows you to command a wide variety of objects of types related by inheritance as long as you know the objects' types.
سؤال
The ________ keyword is used to create an abstract class.

A)Polymorph
B)Inherit
C)Abstract
D)MustInherit
سؤال
An interface reference may invoke only the methods that the interface declares.
سؤال
All objects of a class are guaranteed to provide the functionality described by any interface that the class implements.
سؤال
A class that implements an interface must define all methods and properties of that interface.
سؤال
The UML distinguishes an interface from other classes by placing the word "interface" in__________ above the interface name.

A)italics
B)carets
C)guillemets
D)bold
سؤال
An interface may not provide properties with Get and Set accessors.
سؤال
Declaring an interface Protected allows for extra security precautions.
سؤال
By convention,the name for a Car interface is:

A)InterfaceCar
B)ICar
C)CarI
D)None of the above.
سؤال
A(n)________ is particularly appropriate for providing services that disparate objects have in common.

A)abstract class
B)concrete class
C)interface
D)None of the above.
سؤال
To use an interface,a class must define only the methods in the interface that it will need to use.
سؤال
An interface is typically used in place of a MustInherit class when there is no default implementation to inherit.
سؤال
Which is used to specify that a class will be implementing an interface?

A)Using
B):
C)Implements
D)Extends.
سؤال
If a class leaves one method in an interface undeclared,the class is implicitly declared by Visual Basic as a MustInherit class.
سؤال
A class that implements an interface but does not declare all of the interface's methods must be declared:

A)Public
B)Interface
C)MustInherit
D)Final
سؤال
The purpose of an interface is to:

A)provide similar objects with the same functionality,even though each will implement the functionality differently
B)provide different objects with the same functionality,even though each will implement the functionality differently
C)provide default implementations of methods and properties
D)None of the above.
سؤال
Which of the following does not complete the sentence correctly?
An interface _____________.

A)forces classes that implement it to declare all the interface methods.
B)is used in place of an MustInherit class when there is no default implementation to inherit.
C)cannot be instantiated.
D)can be instantiated.
سؤال
An interface is defined with keyword _________.

A)Interface
B)MustInherit
C)Implements
D)Abstract
سؤال
Which of the following properties could exist in an interface for files,cats and houses?

A)door
B)tail
C)age
D)None of the above.
سؤال
Interfaces can have__________ methods.

A)0
B)1
C)2
D)any number of
سؤال
Objects of unrelated classes that implement the same interface can respond to the method calls of that interface polymorphically.
سؤال
A class that implements an interface may not act as a base class for other classes.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/82
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 10: Object-Oriented Programming: Inheritance
1
A method must be declared __________ for it to be overridden by derived classes.

A)Overrides
B)Overridable
C)Virtual
D)None of the above
Overridable
2
All classes in Visual Basic have Object as either a direct or indirect base class.
True
3
Which of the following pairs demonstrates the "is-a" relationship?

A)car,engine
B)book,table of contents
C)baseball,sport
D)None of the above
C
4
To avoid duplicating code (and possibly errors),use ________,rather than ________.

A)inheritance,the "copy-and-paste" approach
B)the "copy-and-paste" approach,inheritance
C)a class that explicitly extends Object,a class that does not extend Object
D)a class that does not extend Object, a class that explicitly extends Object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
5
__________ is a form of xe "code reuse"xe "software reuse"software reuse in which a new class is created quickly and easily by absorbing an existing class's members and customizing them with new or modified capabilities.

A)Interfacing
B)Inheritance
C)Encapsulating
D)Polymorphism
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
6
A base class's constructors are inherited into its derived classes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which of the following could be a base class for class Computer?

A)machine
B)hard-drive
C)software
D)keyboard
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
8
An advantage of inheritance is that:

A)all methods can be inherited
B)all instance variables can be uniformly accessed by base classes and derived classes
C)Objects of a derived class can be treated as objects of their base class
D)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
9
A base class may have only one derived class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
10
A derived class can add its own instance variables,Shared variables,properties and methods,and it can customize methods and properties it inherits.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
11
Every class in Visual Basic except __________ extends an existing class.

A)Integer
B)Object
C)Type
D)Class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
12
A base class is more specific than its derived class and represents a more specialized group of objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
13
Inheritance is represented by a(n)_________ relationship.

A)"uses"
B)"is-a"
C)"has-a"
D)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
14
Which of the following is not a base/derived class relationship?

A)Ford/Taurus
B)University/Boston University
C)Sailboat/Tugboat
D)Country/USA
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
15
When creating a class,rather than declaring completely new members,you can designate that the new class inherits the members of an existing class.The existing class is called the __________ class,and the new class is the __________ class.

A)derived,base
B)root,child
C)sub,super
D)base,derived
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
16
A class inherited from two or more levels up in the hierarchy is known as a(n) .

A)indirect base class
B)direct base class
C)superclass
D)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
17
The default implementation of method ToString of Object returns a String representing ________.

A)the object's type
B)the object class name
C)namespace_name.object_class_name
D)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
18
Polymorphism enables you to conveniently xe "program in the general"program "in the general" rather than "xe "program in the specific"in the specific."
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
19
Which of the following pairs demonstrates the "has-a" relationship?

A)car,vehicle
B)house,window
C)teacher,person
D)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
20
The class hierarchy begins with class __________.

A)Object
B)Point
C)Root
D)Base
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
21
When a program creates a derived-class object,the Object constructor is the last constructor called and the first whose body finishes executing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
22
Polymorphism allows for specifics to be dealt with during:

A)execution
B)compilation
C)programming
D)debugging
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
23
How can a derived class constructor ccall a base class constructor?

A)implicitly
B)explicitly
C)a and b
D)the derived class cannot call the base class constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
24
For which of the following would polymorphism not provide a clean solution?

A)A billing program where there is a variety of clients who are billed with different fee structures.
B)A maintenance log program where a variety of machine data is collected and maintenance schedules are produced for each machine based on the data collected.
C)A program to compute a 5% savings account interest for bank clients.
D)An IRS program that maintains information on a variety of taxpayers and determines who to audit based on criteria for classes of taxpayers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
25
In practice,derived classes should depend only on the base-class services (that is,Private methods and properties)and not on the base-class data implementation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
26
To call the base-class default constructor explicitly,the call to a base-class constructor must be the first statement in the derived-class-constructor definition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
27
Which statement is true when a base class has Protected instance variables?

A)A derived class object can assign an invalid value to the base class's Protected instance variables.
B)Derived class methods can depend on the base class's Protected data implementation.
C)Derived classes would need to be modified if the base class's Protected data implementation changes.
D)All of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
28
When a derived-class member overrides a base-class member,the base-class member can be accessed from the derived-class by using the Visual Basic keyword .

A)MyBase
B)Top
C)Super
D)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
29
When a request is made to use a derived-class-object method through a base-class reference,Visual Basic polymorphically chooses the correct overridden method in the derived class that is associated with the object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
30
Polymorphism involves:

A)the same message sent to a variety of objects of types related by inheritance
B)a specific message sent to each specific object
C)different messages sent to one object
D)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
31
The first task of any base class's constructor is to call its derived class's constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
32
With Protected instance variables in the base class,all the derived classes of the base class may need to be modified if the base-class implementation changes.In such a case,the software is said to be non-modifiable,because a small change in the base class can "break" derived-class implementations.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
33
Polymorphism allows the addition of classes providing they were at least considered during program development.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
34
Consider the classes below: <strong>Consider the classes below:   Which of the statements below is false?</strong> A)Both variables a and b are instance variables. B)After the constructor for Class B executes,the variable a will have the value 7. C)After the constructor for Class B executes,the variable b will have the value 8. D)A reference to an object of Class A can be treated as a reference to an object of Class B.
Which of the statements below is false?

A)Both variables a and b are instance variables.
B)After the constructor for Class B executes,the variable a will have the value 7.
C)After the constructor for Class B executes,the variable b will have the value 8.
D)A reference to an object of Class A can be treated as a reference to an object of Class B.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
35
When a base class method is overridden in a derived class,it is common to have the derived class version call the base class version and then do some additional work.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
36
Base class methods with this level of access cannot be called from derived classes.

A)Private
B)Public
C)Protected
D)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
37
A base class's method that's overridden in a derived class will be executed implicitly when the derived class's method is called.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
38
The Protected members of a base class may be accessed in their class or any classes derived from that base class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
39
When a derived class constructor calls its base class constructor,what happens if the base class's constructor does not assign a value to one of its instance variables?

A)a syntax error occurs
B)a compile-time error occurs
C)a run-time error occurs
D)the instance variables are initialized to their default values
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
40
Private fields of a base class can be accessed in a derived class

A)by calling Private methods declared in the base class
B)by calling Public or Protected methods declared in the base class
C)directly
D)All of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
41
An abstract class cannot have instance data and non-abstract methods.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
42
Classes which may be instantiated are ___________ classes.

A)instance
B)concrete
C)abstract
D)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
43
Abstract methods and properties do not provide an implementation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
44
The use of polymorphism helps promote software extensibility.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
45
All methods in an abstract class are abstract.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
46
Which answer best describes how many interfaces a class can implement?

A)0
B)1
C)1 or more
D)0 or more
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
47
You may define implementations for abstract methods to act as a default.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
48
The MustOverride keyword has the same effect as the Overridable keyword.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
49
Assigning a derived class reference to a base class variable is safe:

A)because the derived class has an object of its base class.
B)because the derived class is an object of its base class.
C)only when the base class is abstract.
D)only when the base class is concrete.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
50
Objects of abstract base classes can be instantiated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
51
Concrete classes provide implementations for at least one of the methods and properties they define.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
52
Abstract classes are classes which may not be:

A)inherited
B)accessed by derived-classes
C)instantiated
D)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
53
Which of the following statements about MustInherit base classes is true?

A)MustInherit base classes may contain data.
B)MustInherit base classes may not contain implementations of methods.
C)MustInherit base classes must declare all methods as MustOverride.
D)MustInherit base classes must declare all data members not given values as MustOverride.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
54
Once a class implements an interface,all objects of that class have a(n)__________ relationship with the interface type.

A)has a
B)equals
C)is a
D)composition
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
55
Consider the MustInherit base classes below: <strong>Consider the MustInherit base classes below:   Any concrete subclass that inherits class Foo:</strong> A)Must implement a method called Calculate. B)Will not be able to access the instance variable a. C)Will not be able to instantiate an object of class Foo. D)All of the above.
Any concrete subclass that inherits class Foo:

A)Must implement a method called Calculate.
B)Will not be able to access the instance variable a.
C)Will not be able to instantiate an object of class Foo.
D)All of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
56
A class with MustOverride methods does not necessarily have to be a MustInherit class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
57
Attempting to instantiate an object of an abstract class is a logic error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
58
The _________ keyword is used to define methods within a MustInherit class that must be implemented in a derived class for that derived class to be concrete.

A)Overridable
B)Abstract
C)MustOverride
D)MustImplement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
59
Polymorphism allows you to command a wide variety of objects of types related by inheritance as long as you know the objects' types.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
60
The ________ keyword is used to create an abstract class.

A)Polymorph
B)Inherit
C)Abstract
D)MustInherit
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
61
An interface reference may invoke only the methods that the interface declares.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
62
All objects of a class are guaranteed to provide the functionality described by any interface that the class implements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
63
A class that implements an interface must define all methods and properties of that interface.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
64
The UML distinguishes an interface from other classes by placing the word "interface" in__________ above the interface name.

A)italics
B)carets
C)guillemets
D)bold
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
65
An interface may not provide properties with Get and Set accessors.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
66
Declaring an interface Protected allows for extra security precautions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
67
By convention,the name for a Car interface is:

A)InterfaceCar
B)ICar
C)CarI
D)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
68
A(n)________ is particularly appropriate for providing services that disparate objects have in common.

A)abstract class
B)concrete class
C)interface
D)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
69
To use an interface,a class must define only the methods in the interface that it will need to use.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
70
An interface is typically used in place of a MustInherit class when there is no default implementation to inherit.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
71
Which is used to specify that a class will be implementing an interface?

A)Using
B):
C)Implements
D)Extends.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
72
If a class leaves one method in an interface undeclared,the class is implicitly declared by Visual Basic as a MustInherit class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
73
A class that implements an interface but does not declare all of the interface's methods must be declared:

A)Public
B)Interface
C)MustInherit
D)Final
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
74
The purpose of an interface is to:

A)provide similar objects with the same functionality,even though each will implement the functionality differently
B)provide different objects with the same functionality,even though each will implement the functionality differently
C)provide default implementations of methods and properties
D)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
75
Which of the following does not complete the sentence correctly?
An interface _____________.

A)forces classes that implement it to declare all the interface methods.
B)is used in place of an MustInherit class when there is no default implementation to inherit.
C)cannot be instantiated.
D)can be instantiated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
76
An interface is defined with keyword _________.

A)Interface
B)MustInherit
C)Implements
D)Abstract
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
77
Which of the following properties could exist in an interface for files,cats and houses?

A)door
B)tail
C)age
D)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
78
Interfaces can have__________ methods.

A)0
B)1
C)2
D)any number of
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
79
Objects of unrelated classes that implement the same interface can respond to the method calls of that interface polymorphically.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
80
A class that implements an interface may not act as a base class for other classes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 82 في هذه المجموعة.