Adds parameters and field initializers to the constructor.