Chapter 7 Basics of Object Oriented Programming
In this chapter we will discuss fundamental ideas related to object-oriented programming. In brief we will discuss these ideas:
-
OOP is about getting objects to collaborate with each other by asking each other to do things.
-
Object internals can be used to hide implementation details and expose only certain interfaces.
-
We break larger problems into simpler problems by assigning single responsibilities to classes and methods.
-
We discover new classes when we look at "clumps of behavior": methods in a big class that all use the same set of fields or parameters, or conversely a set of parameters that appears to be used together a lot.