search
Log In
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Redirected from merged question 159274
0 votes
130 views

Abstraction and encapsulation are fundamental principles that underlie the object oriented approach to software development. What can you say about the following two statements?

  1. Abstraction allows us to focus on what something  does without considering the complexities of how it works.
  2. Encapsulation allows us to consider complex ideas while ignoring irrelevant detail that would  confuse us.
  1. Neither I nor II is correct
  2. Both I and II are correct
  3. Only II is correct
  4. Only I  is correct
in Object Oriented Programming
recategorized
130 views

1 Answer

1 vote

Abstraction means working with something we know how to use without knowing how it works internally. It allows us to consider complex ideas while ignoring irrelevant details.

Encapsulation allows us to focus on what something does without considering the complexities of how it works.

Therefore,  option 1 is correct. 

Related questions

0 votes
1 answer
1
101 views
Given the array of integers ‘array’ shown below: $\begin{array}{|c|c|c|c|c|c|c|c|c|c|} \hline 13 & 7 & 27 & 2 & 18 & 33 & 9 & 11 & 22 & 8 \\ \end{array}$ What is the output of the following JAVA statements? int[]p= new int [10]; int[]q= new int [10]; for ( int k=0; k<10; k++) p[k]= array [k]; q=p; p[4]=20; System.out.println(array[4]+":"+q[4]); $20:20$ $18:18$ $18:20$ $20:18$
asked Mar 24 in Object Oriented Programming jothee 101 views
0 votes
2 answers
2
126 views
Consider the following JAVA program: public class First { public static int CBSE (int x) { if (x < 100)x = CBSE (x+10); return (x-1); } public static void main(String[]args){ System.out.print(First.CBSE(60)); } } What does this program print? $59$ $95$ $69$ $99$
asked Mar 24 in Object Oriented Programming jothee 126 views
0 votes
1 answer
3
90 views
Which of the following statement(s) with regard to an abstract class in JAVA is /are TRUE ? An abstract class is one that is not used to create objects An abstract class is designed only to act as a base class to be inherited by other classes Only I only II Neither I nor II Both I and II
asked Mar 24 in Object Oriented Programming jothee 90 views
1 vote
1 answer
4
...