title: Copy Constructors that Avoid Privacy Leaks
body: <p>I am studying for an exam and wanted to verify that I am understanding how to build a <strong>copy constructor that avoids privacy leaks</strong>. Specifically a copy constructor that takes in an Object such as Bill. In this example the Bill class has instance variables Money and Date that are type object:</p>
  
  <pre><code>private Money amount; 
  private Date dueDate; 
  </code></pre>
  
  <p>and my constructor right now looks like this:</p>
  
  <pre><code>public Bill(Bill toCopy){
      this.amount = new Money(toCopy.amount);
      this.dueDate = new Date(toCopy.dueDate);
  } 
  </code></pre>
  
  <p>Do I need to make a setter/mutator method for dueDate and amount (such as setDueDate and setAmount), or can I do the above within my copy constructor? 
  Also, we don't need to worry about privacy leaks with primitive types right? i.e If I had a constructor that only took in doubles</p>
  
  <p>Thank you for any feedback!</p>