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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access