recategorized
3,879 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
recategorized

4 Answers

1 votes
1 votes

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 votes
1 votes

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

0 votes
0 votes
3 answers
4
go_editor asked Mar 24, 2020
2,355 views
Which of the following cannot be passed to a function in C++?ConstantStructureArrayHeader file