title: Create a Puppy class with private property name and both a getter and a setter for that property called getName and setName. The constructor should
body: <p>JavaScript is very much not my thing, for those of you who answer these questions, you are absolute life savers.</p>
  
  <p><strong>Create a Puppy class with private property name and both a getter and a setter for that property called getName and setName. The constructor should take a parameter to initialize the private property.</strong></p>
  
  <p><em>My code:</em></p>
  
  <pre><code>public class Puppy {
  private String name;
  
  public Puppy(String name) {
    setName(name);
  }
  
  public String getName() {
    return Name;
  }
  
  public String setName(String name) {
    this.name=name;
  }
  </code></pre>
  
  <p><em>Screenshot:</em>
  <a href="https://i.stack.imgur.com/RgRGM.png" rel="nofollow noreferrer">here</a></p>