Object-Oriented Refactoring
In the last chapter, we saw how refactoring can help improve classes and their methods. In this chapter, we’ll explore the bigger picture with creative uses of object-oriented programming (OOP) to refactor a series of classes into more maintainable forms. These tools will help you perform larger and more impactful refactorings and make a bigger difference in improving your code.
We’ll cover the following topics in this chapter:
- Organizing classes via refactoring
- Refactoring and inheritance
- Controlling inheritance with abstract
- Refactoring for better encapsulation
- Improving classes with interfaces and polymorphism