Certified Associate in Python Programming (PCAP-31-03) — Question 54

What is true about Object-Oriented Programming in Python? (Choose two.)

Answer options

Correct answer: C, D

Explanation

Option C is correct because encapsulation is a principle that restricts access to certain components of an object, enhancing security. Option D is also correct as it defines inheritance, which establishes a hierarchy between classes. Options A and B are incorrect; A mischaracterizes the relationship between objects and classes, and B is inaccurate regarding the directionality of arrows in class diagrams.