We see objects everywhere in our surroundings. These objects have certain properties that define them. There are certain behaviors that these objects perform on their own, and there are actions that can be performed on them.
Let’s take the example of a company employee. An employee has the following properties or attributes:
ID
Salary
Department
The following actions or behaviors can be performed on an employee:
Calculation of tax on salary
Calculation of salary per day
In a company, each worker has a different name, salary, and department, but the type of each worker is employee. So, there is a generic blueprint for each worker working in the company, but each of them has different attributes.
A class has a singular blueprint, and objects are part of a class and are differentiated by their distinct properties.