The Gateway to Computer Science Excellence
+1 vote
216 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 ?

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

II. 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 by Active (2.4k points) | 216 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. 

by Active (2.1k points)
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
50,737 questions
57,321 answers
198,400 comments
105,155 users