The purpose of using objects is to logically organize complex data in our program. In general, Object Oriented Programming allows us to work with complex data in a simple and elegant way.
Objects are real world entities. Something like, every person or things we get around are objects. Objects has two things – Properties and Methods.
Functions enables us to reuse our code snippets multiple time, we can avoid doing the same work several times by using a function. Sometime functions are also called the building blocks of a program.
Functions can be both – pre-defined or system provided and custom (i.e. our own built).