Software Development Fundamentals — Question 52

Which of the following must exist to inherit attributes from a particular class?

Answer options

Correct answer: A

Explanation

Public properties must be present in a superclass to allow subclasses to inherit those attributes. The other options do not directly pertain to the inheritance of attributes; for instance, a has-a relationship refers to composition, while an is-a relationship describes the relationship between a subclass and its superclass.