Soru
11) Which of the following is not true about polymorphism? A. Helps in redefining the same functionality B. Increases overhead of function definition always C. It is feature of OOP D. Ease in readability of program A. polympi-feature can be implemented using encapsulation? A. Polymorphism B. Overloading C. Inheritance D. Abstraction 13)What is reference to an object? A. It is address of an object B. It is address of where the variables and methods of object are stored C. It is pointer having address of an object D. It is address of only variables and not the methods of an object 14)How many objects can be referenced from the same variables? A. One at a time B. Many at a time C. Many using array name D. 7 at max at same time 15)Invoking a method on a particular object is __ sending a message to that ob A. Different from B. Same as C. Somewhat similar D. Part of 16)Which definition best describes an object? A. Instance of a class B. Instance of itself C. Child of a class D. Overview of a class
Çözüm
4.3307 Voting
Tülin
Elit · 8 yıl öğretmeniUzman doğrulaması
Cevap
11) Which of the following is not true about polymorphism?<br />B. Increases overhead of function definition always<br /><br />Explanation: Polymorphism does not always increase the overhead of function definition. It allows for the use of a single interface to represent different types, which can simplify programming and improve flexibility.<br /><br />12) The polympi-feature can be implemented using encapsulation?<br />D. Abstraction<br /><br />Explanation: Polymorphism is a feature of object-oriented programming that allows objects of different classes to be treated as if they were objects of the same class. It can be implemented using abstraction, which allows for the representation of complex systems in simplified ways.<br /><br />13) What is reference to an object?<br />C. It is pointer having address of an object<br /><br />Explanation: A reference to an object is a pointer that holds the memory address of the object. It allows for indirect access to the object's variables and methods.<br /><br />14) How many objects can be referenced from the same variables?<br />C. Many using array name<br /><br />Explanation: An array name can be used to reference multiple objects in an array. Each element in the array can be accessed using the array name followed by the index.<br /><br />15) Invoking a method on a particular object is __ sending a message to that of<br />B. Same as<br /><br />Explanation: Invoking a method on a particular object is the same as sending a message to that object. It is a way of requesting the object to perform a specific action.<br /><br />16) Which definition best describes an object?<br />A. Instance of a class<br /><br />Explanation: An object is an instance of a class. It is a concrete representation of a class, with its own unique set of attributes and behaviors.
Derecelendirmek için tıklayın: