1.

Why do we use user defined classes?(a) To design a user intended code(b) To model real world objects(c) To design the interfaces(d) To model the functionsI have been asked this question in examination.Query is from Class Use topic in chapter Classes of Object Oriented Programming

Answer»

Correct choice is (B) To model real world objects

The best EXPLANATION: The primitive classes are not sufficient for the programming complex algorithms. Some USER defined classes are required to represent a real world object and to DEFINE a blueprint of what the class should actually contain. The user defined classes are as per the requirements and NEED of user.



Discussion

No Comment Found

Related InterviewSolutions