O'Reilly logo

Technical Java™: Developing Scientific and Engineering Applications by Grant Palmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 18. Building Class Hierarchies

In Chapter 1, “Introduction to Java,” we mentioned that one of the strengths of Java is that it allows you to develop class hierarchies. Hierarchies help you to organize your code and they facilitate code reuse. Because of inheritance, you can place common methods higher in the class hierarchy so they can be accessed by any number of classes lower in the hierarchy. In this chapter, we will go through the process of designing and implementing a class hierarchy to model a gas mixture, but the concepts and design strategies demonstrated here are applicable to all class hierarchies.

Developing class hierarchies is as much a design problem as it is one of programming. You must first think about the best way to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required