What is the purpose of constructor in a class?​