Define the class automobile and use window as a member of


Problem

Sometimes inheritance is used improperly. For example, consider defining an automobile class. We have an existing class window. Since automobiles have windows, we have two options: we can derive automobile from window, assuring that the automobile will have a window or we can define the class automobile and use window as a member of the class. Why is the second solution better? Explain the proper use of inheritance in terms of the is-a relation.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Define the class automobile and use window as a member of
Reference No:- TGS02680029

Expected delivery within 24 Hours