Answer the following statements true (T) or false (F)

1. The Protected members of a base class may be accessed in their class or any classes derived from that base class.
2. With Protected instance variables in the base class, all the derived classes of the base class may need to be modified if the base-class implementation changes. In such a case, the software is said to be non-modifiable, because a small change in the base class can “break” derived-class implementations.
3. In practice, derived classes should depend only on the base-class services (that is, Private methods and properties) and not on the base-class data implementation.
4. Polymorphism allows the addition of classes providing they were at least considered during program development.
5. When a request is made to use a derived-class-object method through a base-class reference, Visual Basic polymorphically chooses the correct overridden method in the derived class that is associated with the object.

True.
2. False. In such a case, the software is said to be brittle.
3. False. In practice, derived classes should depend only on the base-class services (that is,
non-Private methods and properties) and not on the base-class data implementation.
4. False. Polymorphism can be used to include classes that were not even envisioned during
program development.
5.True.

Computer Science & Information Technology

You might also like to view...

A(n) ________ method of risk assessment needs to be applied across the business enterprise

Fill in the blank(s) with correct word

Computer Science & Information Technology

A writer is contacted by her executive editor to see whether everything is okay because the copy editor had been sending emails to the writer. The writer responds to the executive editor and tells him that no emails have been received from the copy editor. What is the most likely problem?

A) The copy editor has not clicked on Send and the emails are in the drafts folder. B) Windows Firewall is blocking the copy editor's email provider. C) The email application has quarantined the emails. D) The emails were addressed to another person.

Computer Science & Information Technology