Distinguish between inheriting interface and inheriting implementation. How do inheri- tance hierarchies designed for inheriting interface differ from those designed for inheriting imple- mentation?

What will be an ideal response?

When a class inherits implementation, it inherits previously defined functionality from another class. When a class inherits interface, it inherits the definition of what the interface to the new class type should be. The implementation is then provided by the programmer defining the new class type. Inheritance hierarchies designed for inheriting implementation are used to reduce the amount of new code that is being written. Such hierarchies are used to facilitate software reusability. Inheritance hierarchies designed for inheriting interface are used to write programs that perform generic processing of many class types. Such hierarchies are commonly used to facilitate software extensibility (i.e., new types can be added to the hierarchy without changing the generic processing capabilities of the program.)

Computer Science & Information Technology

You might also like to view...

What summarizes a data source into a grid of rows and columns?

A) Append query B) Make table query C) Find duplicates table D) Crosstab query

Computer Science & Information Technology

Which CentOS 7 vmstat basic field provides the percentage of total processor time consumed by the kernel?

A. procs B. us C. sy D. id

Computer Science & Information Technology