What do you know about C++ Polymorphism? C++ Polymorphism means that a call to a member function will cause a different function to be executed depending on the type of object that invokes the function. Take up the quiz below and get to review what you got to understand from the classwork this past week. All the best!
Classes that are containers for other classes
Large amounts of data with efficiency
A wide variety of classes in a general manner
None of the above
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
Execution
Compilation
Programming
Debugging
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
A derived class reference cannot be assigned to a base class variable and a base class reference cannot be assigned to a derived class variable.
A derived class reference can be assigned to a base class variable and a base class reference can be assigned to a derived class variable.
A base class reference can be assigned to a derived class variable, but a derived class reference cannot be assigned to a base class variable.
A derived class reference can be assigned to a base class variable, but a base class reference cannot be assigned to a derived class variable.
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
A reference of the base class that defines the behavior of the object
A reference of the same type as the object
An object reference to the actual object
None of the above.
Rate this question:
Polymorphism is indicated by a runtime warning from the FCL.
Polymorphism is indicated by the use of the keyword virtual in a method signature.
Polymorphism is indicated by the use of the keyword override in a method signature.
Both B and C are correct statements.
Rate this question:
Public int method1();
Public int abstract method1();
Public abstract int method1();
Public int nonfinal method1();
Rate this question:
Must implement a method called calculate.
Will not be able to access the instance variable a.
Will not be able to instantiate an object of class Foo.
All of the above.
Rate this question:
Because the derived class has an object of its base class.
Because the derived class is an object of its base class.
Only when the base class is abstract.
Only when the base class is concrete.
Rate this question:
True
False
Rate this question:
Prevent overriding and inheritance
Guarantee an implementation exists
Specify a class is concrete
None of the above.
Rate this question:
Sealed methods allow inlining the code.
Sealed methods and classes prevent further inheritance.
Sealed methods are static.
Sealed methods can improve performance.
Rate this question:
It will prepare the object for garbage collection
It cannot be accessed from outside its class
It cannot be overloaded
It cannot be overridden
Rate this question:
True
False
Rate this question:
Abstract class
Concrete class
Interface
None of the above.
Rate this question:
Provide similar objects with the same functionality, even though each will implement the functionality differently
Provide different types of objects with the comparable functionality, even though each will implement the functionality differently
Provide default implementations of methods and properties
None of the above.
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.