A class is a blueprint. A plan of doing something. Suppose we want to keep reviews through a class. Objects contain data and methods to send and receive messages.
It decides how a ‘review’ object will behave in future. Every object may not behave in the same fashion because one review may remain incomplete. You’ve to think every possibility before planning a class. It’s a good practice to have your pen and notebook ready so that you can write it down completely. What you’re going to do will be your flow chart. And the code you write inside your class will be your algorithm.
Now we have a ‘Review’ class.