PCPP-32-101

Review 80 PCPP-32-101 practice questions with answer explanations and community insights.

Question 1

Select the true statement about composition.

  1. Composition extends a class’s capabilities by adding new components and modifying the existing ones
  2. Composition allows a class to be projected as a container of different classes
  3. Composition is a concept that promotes code reusability, while Inheritance promotes encapsulation
  4. Composition is based on the has a relation, so it cannot be used together with inheritance

Question 2

Analyze the following snippet and select the statement that best describes it.

  1. The code is an example of implicitly chained exceptions.
  2. The code is erroneous as the OwnMath class does not inherit from any Exception type class
  3. The code is fine and the script execution is not interrupted by any exception.
  4. The code is an example of explicitly chained exceptions

Question 3

Analyze the following snippet and select the statement that best describes it.

  1. self.name is the name of a class variable
  2. var1 is the name of a global variable
  3. Excalibur is the value passed to an instance variable
  4. weapon is the value passed to an instance variable

Question 4

The following snippet represents one of the OOP pillars. Which one is that?

  1. Serialization
  2. Inheritance
  3. Encapsulation
  4. Polymorphism

Question 5

Analyze the following function and choose the statement that best describes it.

  1. It is an example of a decorator that accepts its own arguments.
  2. It is an example of decorator stacking.
  3. It is an example of a decorator that can trigger an infinite recursion
  4. The function is erroneous.
We are moving to a new platform

CertificationTest is being migrated. Some pages may be slow or briefly unavailable; everything will be back to normal within a few hours. If you run into any issue, email support@certificationtest.net.