Chapter 11: More Object-Oriented Programming
This chapter is the second part of our whirlwind tour (theoretical and practical) into OOP. We have already briefly discussed the concepts of encapsulation, inheritance, and polymorphism, but in this chapter, we will get to see them more in action in some demo apps. While the working examples will show these concepts in their simplest forms, it will still be a significant stepping stone towards taking control of our layouts via our Java code.
In this chapter, we will explore the following:
- Encapsulation in depth and how it helps us
- Inheritance in depth and how to take full advantage
- Polymorphism explained in greater detail
- Static classes and how we have been using them already
- Abstract classes and interfaces
First, we will handle encapsulation.