A famous programmer once remarked "Any fool can write code that a computer can understand. Good Programmers write code that humans can understand".

Object-oriented programming is primarily about isolating concepts into their own entities or, in other words, creating abstractions.

The great idea behind object-oriented programming: a program is built from small and distinct objects that work together.

Object

An Object refers to an independent entity that contains both data (instance variables) and behavior (methods).

Objects may come in lots of different forms: some may describe problem-domain concepts, others are used to coordinate the interaction that happens between objects.

Objects interact with one another through method calls — these method calls are used to both request information from objects and give instructions to them.

Generally, each object has clearly defined boundaries and behaviors and is only aware of the objects that it needs to perform its task.

In other words, the object hides its internal operations, providing access to its functionality through clearly defined methods. Moreover, the object is independent of any other object that it doesn't require to accomplish its task.

A class contains the blueprint needed to create objects, and also defines the objects' variables and methods. An object is created on the basis of the class constructor.

In reality, we can relate all kinds of different information and things to a person. However, when building an application that deals with people, the functionality and features related to a person are gathered based on the application's use case.

The state of an object is the value of its internal variables at any given point in time.

Class

A class defines the types of objects that can be created from it. It contains instance variables describing the object's data, a constructor or constructors used to create it, and methods that define its behavior.