Yes these are two differents things.
You have to think about what exactly is your object and how he relates to his properties.
Constructor let you initialize the class variables dynamically at the time of instantiating the class so you should put the parameters without which the object would not be what it is (In the context of your code)
The setters methods are a totally different thing, it let you access variable to modify it.
You should have setters when ,in your code, it make sense to modify a private variable.
If having a Dog
without a name does not make sense in your code then add it as parameter in constructor.
Can a Dog
be renamed ? if yes, then add a setName
method.
Does your Dog
have a default run speed that you can modify ? Then add a default speed
variable in the class and setSpeed
method.
Constructor are for parameters that make an object what it is and parameters that you always want to define when instanciating the object.
Setters are for modifying parameters after object was created.