Suppose, there are two employees at Educative, Mark and Chris. The properties of Mark and Chris are given in the image below:
Properties
Properties are variables that contain information regarding the object of a class. An employee object will have an ID, a salary, and the department as its properties. New properties can be added to become a part of an object of the employee class.
Attributes are also referred to as properties or members. For consistency, we will be using properties.
Methods
Methods are like functions that have access to properties (and other methods) of a class. Methods can accept parameters and return values. They are used to perform an action on an object of a class. In the example above, we have tax() and salaryPerDay() as class methods.