Introduction to Objects and Classes

A brief encounter

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