Data Structures and Algorithms in Java
Data Structures and Algorithms in Java
6th Edition
ISBN: 9781119278023
Author: Michael T. Goodrich; Roberto Tamassia; Michael H. Goldwasser
Publisher: Wiley Global Education US
Question
Book Icon
Chapter 2, Problem 10R
Program Plan Intro

Shallow inheritance:

Consider that there are classes such as “A”, “B”, “C” and so on. In which all these classes extends a single class “Z”.

This type of inheritance is referred as shallow inheritance.

Blurred answer
Students have asked these similar questions
We would like to design a software system so that ...        we can easily add new functionality without large changes in our software design or code-level implementation.      we can easily add or remove easily new functionality without large changes in our software design or code-level implementation.     we can easily modify the existing functionality without large changes in our software design or code-level implementation.     we can easily use the software system in different scales, i.e., create more or less instances of classes.      we can do all of the above.
When can the occurrence of dual inheritance lead to uncertainty? Is there any way to fix this issue? Just what are virtual base classes? Where does their value lie, exactly?
A lot of these patterns feel very powerful and useful for abstracting and re-using code. Although, I am curious to know as to the extent in which a class "should" be extended in order to prevent unwanted bugs or over-use of a base class that could lead to a chain of inheritance that becomes too brittle.?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education