CHAPTER 5

image

Object-Oriented Design Principles

9781430247647_unFig05-01.jpg

We covered object-oriented programming basics in Chapter 3 and more advanced OOP topics in Chapter 4. In this chapter, we delve still more deeply into OOP concepts.

The chapter begins with an in-depth investigation of interfaces. We will discuss how interfaces are different from abstract classes and which construct to use in a given situation. In the second section, we introduce you to the object composition principle that says “favor composition over inheritance.”  The third and fourth sections ...

Get Oracle Certified Professional Java SE 7 Programmer Exams 1Z0-804 and 1Z0-805: A Comprehensive OCPJP 7 Certification Guide 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.