...
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024

OOPS

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

A
Neither I nor II is correct.
B
Both I and II are correct.
C
Only II is correct.
D
Only I is correct.
Question 10 Explanation: 
Statement-I: FALSE
→ Abstraction is a process of hiding the implementation details and showing only functionality to the user.
→ The data type created by the data abstraction process is called abstract data type(ADT).
→ ADT is a class of objects whose logical behavior is defined by a set of values and a set of operations.
Statement-II: FALSE
→ Encapsulation is a mechanism to associate the code and data.
→ Encapsulation is wrapping up of data into single unit.
Correct Answer: A
Question 10 Explanation: 
Statement-I: FALSE
→ Abstraction is a process of hiding the implementation details and showing only functionality to the user.
→ The data type created by the data abstraction process is called abstract data type(ADT).
→ ADT is a class of objects whose logical behavior is defined by a set of values and a set of operations.
Statement-II: FALSE
→ Encapsulation is a mechanism to associate the code and data.
→ Encapsulation is wrapping up of data into single unit.

Leave a Reply

Your email address will not be published. Required fields are marked *