Lesson 17Exploring Interfaces, Composition, and Inheritance

In this lesson, we will overview three more language features that help us write good software: interfaces, composition, and inheritance.

Proper use of these features can help us create well-designed object-oriented programs, and you will use them throughout your career. In this lesson, we discuss each of these features and look at the kinds of problems each can address. Think of this lesson as your guide to what these features are and why and when to use them. The implementation details of each of these features will be covered in more detail in the next few lessons as well as throughout the rest of the course. We will learn where these tools are appropriate and how to use them in projects. For now, just concentrate on the big concepts associated with each of these features.

HOW DO THESE TOOLS HELP?

Interfaces, composition, and inheritance can help us write better, more maintainable software by doing the following:

  • Allowing us to control how other code interacts with our objects
  • Allowing us to define relationships between the objects ...

Get Job Ready Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.