Question 1
Which one of the following are essential features of an object-oriented programming language? (GATE CS 2005) (i) Abstraction and encapsulation (ii) Strictly-typedness (iii) Type-safe property coupled with sub-type rule (iv) Polymorphism in the presence of inheritance
Question 3
Class P { void f(int i) { print(i); } } Class Q subclass of P { void f(int i) { print(2*i); } }Now consider the following program fragment:
P x = new Q(); Q y = new Q(); P z = new Q(); x.f(1); ((P)y).f(1); z.f(1);Here ((P)y) denotes a typecast of y to P. The output produced by executing the above program fragment will be
Question 5
Which one of the following are essential features of object oriented language? A. Abstraction and encapsulation B. Strictly-typed C. Type-safe property coupled with sub-type rule D. Polymorphism in the presence of inheritance
Question 7
Question 8
Question 9
Question 10
There are 12 questions to complete.