πŸ“’ Too many exams? Don’t know which one suits you best? Book Your Free Expert πŸ‘‰ call Now!

  • google app store apple app store
  • βœ–

      Question

      What is the relationship between encapsulation and

      abstraction?
      A They are the same concept. Correct Answer Incorrect Answer
      B Encapsulation is a way to achieve abstraction. Correct Answer Incorrect Answer
      C Abstraction is a way to achieve encapsulation. Correct Answer Incorrect Answer
      D They are unrelated concepts. Correct Answer Incorrect Answer
      E Encapsulation is only for data, abstraction is only for methods. Correct Answer Incorrect Answer

      Solution

      Encapsulation is often considered a mechanism or technique that helps achieve abstraction. By encapsulating the internal workings of a class (hiding data and implementation details), we present a simpler, more abstract view of the object to the outside world.

      Practice Next
      ask-question