PrepAway - Latest Free Exam Questions & Answers

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

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

PrepAway - Latest Free Exam Questions & Answers

A.
Public properties

B.
A has-a relationship

C.
Static members

D.
An is-a relationship

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.

3 Comments on “Which of the following must exist to inherit attributes from a particular class?

  1. DB7 says:

    I would say Public Properties.
    To me, Is-A and Has-A are design patterns not requirements. ie: you cannot inherit if base class does not have public members, irrespective if there is a has-a or is-a relationship between thew two classes.




    0



    0

Leave a Reply