recategorized by
1,450 views
5 votes
5 votes

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
  1.  $A$ and $B$ only 
  2.  $A,D$ and $B$ only 
  3.  $A$ and $D$ only 
  4.  $A,C$ and $D$ only
recategorized by

1 Answer

Best answer
7 votes
7 votes

Essential features of object-oriented language are 

  1. Inheritance: forming a new class from an existing class. It helps to reuse code.  
  2. Abstraction: Provide only essential information to the outside world and hide background details.  
  3. Overloading: specify more than one definition for a function name or an operator in the same scope.
  4. Polymorphism: A call to a member function will invoke a different function depending on the type of object that invokes the function.
  5. Encapsulation: Binding data and functions accessing the data together and that keeps both safe from outside interference and misuse.

Now, go through the given options,

  • A is true.
  • B is false ( Perl is a loosely typed language but supports OOPS),
  • C is false
  • D is true

Answer is C)  A and D only

selected by
Answer:

Related questions

9 votes
9 votes
2 answers
1
gatecse asked Dec 17, 2017
3,743 views
Consider the following $C$ function#include<stdio.h int main(void) { char c[]="ICRBCSIT17" char *p=c; printf("%s",c+2[p]-6[p]-1); return 0; }The output of the program is ...
3 votes
3 votes
2 answers
2
gatecse asked Dec 17, 2017
1,662 views
Consider the functionint func(int num) { int count=0; while(num) { count++; num>>=1; } return(count); }For $func(435)$ the value returned is$9$$8$$0$$10$
2 votes
2 votes
1 answer
3
gatecse asked Dec 17, 2017
2,140 views
Consider the functionint fun(x: integer) { If x>100 then fun=x-10; else fun=fun(fun(x+11)); }For the input $x=95$, the function will return$89$$90$$91$$92$
9 votes
9 votes
1 answer
4