Exercise: Object Oriented Programming Using Cpp

Questions for: Object Oriented Programming Using Cpp

If you want to override constructor default values for an object you are instantiating, you must also override
A:
all other parameters to that constructor
B:
all parameters to the left of that value
C:
all parameters to the right of that value
D:
no other parameters to that constructor
Answer: B
No answer description is available. Let's discuss.
You must provide a constructor for a derived class
A:
always
B:
if the base class constructor required arguments
C:
if the base class constructor does not required arguments
D:
never
Answer: B
No answer description is available. Let's discuss.
A static data member is given a value
A:
within the class definition
B:
outside the class definition
C:
when the program is executed
D:
never
Answer: B
No answer description is available. Let's discuss.
Which of the following statements uses the computer's clock to initialize the random number generator?
A:
srand(time);
B:
srand(time(NULL));
C:
time(srand);
D:
time(srand(NULL));
Answer: B
No answer description is available. Let's discuss.
The process of extracting the relevant attributes of an object is known as
A:
polymorphism
B:
inheritance
C:
abstraction
D:
data hiding
Answer: C
Abstraction is the process of extracting the relevant properties of an object while ignoring nonessential details. The extracted properties define a view of the object.
Ad Slot (Above Pagination)
Quiz