-
Book Overview & Buying
-
Table Of Contents
Android Programming for Beginners - Fourth Edition
By :
OOP is a programming approach that breaks our apps into manageable chunks of code, rather than having everything mashed into one. Each chunk of code works with the other chunks and yet is self-contained, and therefore reusable by other apps, modifiable without affecting the other chunks that use it, and maintainable by different teams. We have been reusing the code chunks of the Android libraries throughout this book. This description is not that far from the concept of composable functions introduced in Chapter 8, but OOP goes deeper.
These code chunks that I refer to have a name. We code a class, and when we utilize it in an app, we call the instance an object. A class, therefore, can be thought of as the blueprint of an object.
We can code a class and then instantiate an instance of it. This instance is called an object. Think about a house blueprint; you can't live in it, but you can build a house from it, so you build an instance...