package com.google.sps.data;

import java.util.HashSet;
import java.util.Set;

public final class VolunteeringOpportunity {
  private String name;
  private Set<String> skillsRequired;
  private int numSpotsLeft;
  private Set<User> volunteers;

  public VolunteeringOpportunity(
      String name, Set<String> requiredSkills, int numSpotsLeft, Set<User> volunteers) {
    this.name = name;
    this.skillsRequired = skillsRequired;
    this.numSpotsLeft = numSpotsLeft;
    this.volunteers = new HashSet<User>();
  }

  public String getName() {
    return this.name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Set<String> getRequiredSkills() {
    return this.skillsRequired;
  }

  public void setRequiredSkills(Set<String> requiredSkills) {
    this.skillsRequired = requiredSkills;
  }

  public void addRequiredSkill(String requiredSkill) {
    this.skillsRequired.add(requiredSkill);
  }

  public int getNumSpotsLeft() {
    return this.numSpotsLeft;
  }

  public void setNumSpotsLeft(int numSpotsLeft) {
    this.numSpotsLeft = numSpotsLeft;
  }

  public Set<User> getVolunteers() {
    return this.volunteers;
  }

  public void addVolunteer(User volunteer) {
    this.volunteers.add(volunteer);
  }
}

@@ -162,30 +162,30 @@
 String%3E 
-skillsR
+r
 equired
+Skills
 ;%0A  priv
@@ -236,16 +236,34 @@
 lunteers
+ = new HashSet%3C%3E()
 ;%0A%0A  pub
@@ -358,30 +358,8 @@
 Left
-, Set%3CUser%3E volunteers
 ) %7B%0A
@@ -384,50 +384,8 @@
 me;%0A
-    this.skillsRequired = skillsRequired;%0A
     
@@ -431,40 +431,39 @@
 his.
-volunteers = new HashSet%3CUser%3E()
+requiredSkills = requiredSkills
 ;%0A  
@@ -643,30 +643,30 @@
 rn this.
-skillsR
+r
 equired
+Skills
 ;%0A  %7D%0A%0A 
@@ -735,30 +735,30 @@
    this.
-skillsR
+r
 equired
+Skills
  = requi
@@ -841,22 +841,22 @@
 his.
-skillsR
+r
 equired
+Skills
 .add

Fix from code review.