Object Oriented Programming - Object Modelling - 2

26:  

A default constructor

A.

takes no arguments

B.

has default values for all its arguments

C.

either (a) or (b)

D.

none of these

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



27:  
If you want to override constructor default value for an object you are instantiating, you must also override
A.

all other parameters to that constructor

B.

all parameters to the left of the value 

C.

all parameters to the right of that value

D.

not other parameters to that constructor.

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



28:  
If you omit any constructor argument when you instantiate an object, you must use default values
A.

for all parameters to the constructor

B.

for all parameters to the right of the argument

C.

for all parameters to the left of the argument

D.

for no other parameters.

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



29:  
In a class specifier, data or functions designated private are accessible
A.

to any function in the program

B.

only if you know the password

C.

to member functions of that class

D.

only to public members of the class.

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



30:  

A constructor initialization list is preceded by

A.

a semicolon

B.

a colon

C.

two colons

D.

a space

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here: