Object Oriented Programming - Object Modelling - 2

11:  
To instantiate an object with the statement ifstream items ("C:inven.txt");, the file on the disk is identified by the name
A.

items

B.

inven.txt

C.

either (a) or (b)

D.

none of these

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



12:  

Inheritance is the principle that

A.
classes with the same name must be derived from one another
B.
knowledge of a genral category can be applied to more specific objects
C.
C++ functions may be used only if they have logical predecessors
D.
one function name may invoke different methods
 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



13:  
Compared with the classes from which they are derived, inherited classes may have
A.

additional data members

B.

additional member functions

C.

both (a) and (b)

D.

none of these

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



14:  
To be called object-oriented, a programming language must allow
A.

functions that return only a single value

B.

#include files

C.

inheritance

D.

all of these

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



15:  
Which is a correct less definition for class Child, which inherits from Mother and Father classes?
A.

class Child::Mother, Father

B.

class Child:Mother, Father

C.

class Child::public Mother, public Father

D.

class Child:public Mother, public Father

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here: