PCAP-31-03 Exam QuestionsBrowse all questions from this exam

PCAP-31-03 Exam - Question 24


Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Choose two.)

Show Answer
Correct Answer: BD

To determine which classes are declared properly, we need to consider the inheritance hierarchy and ensure that there are no conflicts or circular dependencies. The base class is A, while B and C are derived from A. Option A (class Class_3(A,C): pass) is incorrect because class C is already a child of class A, leading to a conflict. Option B (class Class_2(B,C): pass) is correct because B and C are derived from A, and there is no conflict or circular dependency. Option C (class Class_4(A,B): pass) is incorrect because class B is already a child of class A, leading to a conflict. Option D (class Class_1(C,B): pass) is correct because both C and B derive from A without any conflicts. Thus, the properly declared classes are found in options B and D.

Discussion

2 comments
Sign in to comment
DKAT2023Options: BD
Jun 29, 2024

B and D are corrects

Dave304409Options: BC
Jul 4, 2024

is correct