Throughout these lessons, you have been using an object of type Finch. The Finch is defined in Python as a class, which is a programming structure that includes all the functions and variables that relate to a single object. An object can be something abstract like a database, but in the case of the Finch, it is a physical object!
Encapsulating functions and variables in classes is called object-oriented programming. When it is inside a class, a function is called a method. A class enables a programmer to use the class’s methods without having to understand how they are implemented. This is an example of abstraction in computer science. This means that the details are handled once in a piece of reusable code. Others can then use that code to solve new problems without worrying about those details. Functions are also an example of abstraction.