您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Reflect Index

Reflect Page # 6

Discussion Topic 1 — The 'diamond of death' class model

It is easy to make a case for disallowing multiple inheritance by considering the so-called `diamond of death' class model. This is a class structure as shown below:

Here D is a subclass of B and C (multiple inheritance), while B and C are both subclasses of A. It might seem at first sight that this structure is unusual, but in practice it can occur quite frequently.

What real-world structures may lead to `diamond of death' class structures?

What are the problems with this structure?

Contribution for Discussion Topic 1

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg