CPlusOOP
SiteMap
Reusable Software
Structured Programming
Polymorphism
«Prev
Reusable Code
Polymorphism Concept
Define Polymorphism Concept
Difference Conversion Overloading
ADT Conversion
Conversion Member Functions
Comparing Conversion Operators
Compiler Selects Overloaded Function
Signature Matching Algorithm
Selection Algorithm Function Overloading
Overloaded Function Example
Using Polymorphism Conclusion
Operator Overloading
Overload Operators
Overloadable Operator Types
Declare Friend Function
friend Function Usage
Operator Keyword
Unary Binary Operator Overloading
Overloading Unary Operators
Overloading Binary Operators
Overloading Assignment Operator
Input Output Operators
Overloading Output Operator
Overloading Input Operator
Overloading Pointer Operator
Overloading New Delete
Operator Overloading Guidelines
Overloading Operators Summary
friend Function - Quiz
Pure Polymorphism
Define Class Inheritance
Pure Polymorphism
Derived Class
Public Inheritance
public Inheritance - Quiz
Constructors Base
Reference Typing Conversions
print member-function
Virtual Functions
Guidelines Virtual Functions
Virtual Function - Selection
Virtual Function - Exercise
Abstract Classes
Reinterpret const cast
Dynamic cast Operator
RTTI
typeid Operator
throw C++ Exception
Pure Polymorphism Conclusion
Ecological Simulation
ADT Conversions Constructor - Quiz
1.
Explicit cast conversion is necessary:
A.
anytime an int needs to be converted to a double
B.
anytime any native type needs to be converted to another native type
C.
anytime a user-defined type is used as an argument to a function
D.
when the implicit conversion is not desired or expression is illegal otherwise
2.
A constructor is a conversion constructor if:
A.
it takes two arguments: the "from-type" and "to-type"
B.
it has only one "from-type" argument and the "to-type" is implied
C.
it takes either two arguments or it takes only the "from-type" argument
D.
the constructor has no arguments and is made for you by the compiler
3.
To convert from a user-defined type to a built-in type, you must add a special conversion member function to the class. This member function must:
A.
use the operator keyword in its declaration
B.
be a static member function
C.
have a return type
D.
not have an empty argument list
Correct answers:
Your Score: 0
Submit
Quiz Explanation