If a base class has public Set and Get functions for its data members, does a child of that class inherit these Sets and Gets or does the programmer have to write new Set and Get functions? Explain.

What will be an ideal response?


If the Set and Get functions are either protected or public, the child inherits them. It doesn’t make sense for Set and Get functions to be protected, as they should be used by the object (who only has access to public members).

Computer Science & Information Technology

You might also like to view...

____ management data allows corporations to better judge application and system security risks.

A. Qualitative B. Quantitative C. Objective D. Direct

Computer Science & Information Technology

Context is important when interpreting the effect of the ____________________ unit.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A subclass can directly access protected members of a superclass.

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

Computer Science & Information Technology

The ________ function looks for a value within a range and returns the position of that value

Fill in the blank(s) with correct word

Computer Science & Information Technology