passing the main object is allowing the quacker method in Duck class to change the variable values
Improving coupling means we should reduce the class to class interaction
this is required because of following reasons
Suppose some programmer has written Duck class and another has written the Main class
now the programmer of the Main class wants to write something very very important to the class and does not want it to give it to another classes
but wait here
we are passing the object of the main class to the Duck class quacker method which can modify the Main class which is not desired at all
so we should not pass the Main type parameter to the quacker method
I hope this helps a little
and yes
about z
no need to make it private because we are not accessing it from some other class (in our case, the main class)
Happy preparation