Which of the following must exist to inherit attributes from a particular class?
A.
Public properties
B.
A has-a relationship
C.
An is-a relationship
D.
Static members
Explanation:
Visual Basic has been a pioneer of binary code reuse — controls being the classic example.
You reuse the code in a control by placing an instance of the control on your form. This is
known as a containment relationship or a has-arelationship; that is, the form contains or has
a CommandButton.
C. An is-a relationship
is-a = inheritance
has-a = composition
Agree its C. see http://learnwithharsha.com/my-first-java-lesson-is-a-and-has-a-relationships/
Is anyone taking the exam soon? Please email me at [email protected] for info exchange and preparation. I plan on taking the exam b/w 12th Oct and 16th Oct, 2015.
Hey Usman, can you tell me about the exam questions?
I have my exam tomorrow!
I think A,
as Is-A is more a model to create a hierarchy, whereas Public properties are compulsory in order to inherit, whether it be Is-a or has-a (for the sake of argument). The answer given above is definetely wrong, and the other site that i was on had Public Properties as the answer for the exact same question.