CPlusOOP
SiteMap
Reusable Software
Structured Programming
Operator Overloading
«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
1.
A user-defined type's public behavior should be dictated by
A.
the classes available in a library
B.
what is most efficient
C.
the most narrow construct that supports its needs
D.
expectations found in the community that uses it
2.
When creating a mathematical ADT you should overload
A.
all possible mathematical operators
B.
all those mathematical operators that make sense for the class
C.
only those mathematical operators for which you have immediate use
D.
no operators, they are overloaded automatically by the compiler
3.
Binary operators that are overloaded
A.
should generally be
friend
functions because this allows more natural use of the operators
B.
must be
friend
function. There is no other way to implement the overload.
C.
should generally be a member function because this provides the best privacy
D.
can be either
friend
or member function. Neither method is better.
Correct answers:
Your Score: 0
Submit
Quiz Explanation