in Object Oriented Programming recategorized
2,936 views
0 votes
0 votes

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
2.9k views

1 comment

At the end why you mention that answer is B please explain answer !
0
0

4 Answers

1 vote
1 vote

Ans is 1

Abstraction and encapsulation are fundamental principles that underlie the object oriented approach to software development. Encapsulation allows us to focus on what something does without considering the complexities of how it works.

Abstraction allows us to consider complex ideas while ignoring irrelevant detail that would confuse us.

Hence none is correct

1 vote
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. 

0 votes
0 votes
B) I think both Option I and II are correct. The main goal of abstraction is to remove unnecessary intricate complexities from the end user. A car's brake is a typical example used to illustrate the idea. It is not necessary for a driver to know how a brake functions. All he has to know is that is pressing the brake will cause the car to stop.

   The goal of encapsulation is to enable better modelling of real world problems. Combining properties of a real world object(attributes) and its behaviour is called is encapsulation. And it enables us to model complex real world applications.

 

Please correct me If I am wrong.

3 Comments

no it is just the reverse
0
0
what reverse?
0
0

ans is added. its just the definition of encap. is written in place of abstraction in the question...and vice versa

  1. Abstraction allows us to  consider complex ideas while ignoring irrelevant detail that would confuse us
  2. Encapsulation allows us focus on what something does without considering the complexities of how it works
0
0
0 votes
0 votes

option 1

none is correct. 

  1. Abstraction allows us to  consider complex ideas while ignoring irrelevant detail that would confuse us
  2. Encapsulation allows us focus on what something does without considering the complexities of how it works
Answer:

Related questions

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