Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PCPP-32-101 All Questions

View all questions & answers for the PCPP-32-101 exam

Exam PCPP-32-101 topic 1 question 1 discussion

Actual exam question from Python Institute's PCPP-32-101
Question #: 1
Topic #: 1
[All PCPP-32-101 Questions]

Select the true statement about composition.

  • A. Composition extends a class’s capabilities by adding new components and modifying the existing ones
  • B. Composition allows a class to be projected as a container of different classes
  • C. Composition is a concept that promotes code reusability, while Inheritance promotes encapsulation
  • D. Composition is based on the has a relation, so it cannot be used together with inheritance
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ghozlane
1 year, 1 month ago
Selected Answer: B
composition in POO allows a class to act as a container
upvoted 1 times
...
IBTIjL
1 year, 2 months ago
Selected Answer: B
Composition in POO allows a class to act as a container that holds instances of other classes, fostering code reusability and enabling the creation of complex structures by combining simpler components. It establishes a "has-a" relationship, promoting encapsulation and flexibility, as the container class can access the public interface of the contained classes, but not their internal details, facilitating modular and adaptable code design.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...