When a constructor method does have the arguments, but they are not needed to be passed after creation, then this method is known as the “no-argument constructor”. To make a constructor with no arguments, we have to use required = “false” and the default value becomes zero.

When an object is created for a CFC component, then it is needed to create variables within the adjacent CFC. The variable scope is default private, so it can’t be modified from anywhere. To get or provide the value from a property, two special methods are declared. Setters and accessors are used to complete this task.

The methods which provide value to the variables, are called as setters/mutators. To declare the setter method, set() and replacing() methods are used in coldfusion framework. The default parameters value is required = “true” so because value can be passed as argument to the property.

The getter/accessor methods are used to retrieve the value from the property. Its overall syntax is similar to the setter method. There is no value passed because getter method directly reads the value from the property and returns it back to the user.

reference link -