/** A course at a university.*/
public class Course {
  
  /** The name of the course. */
  private String name;
  
  /** The name of the course instructor. */
  private String instructor;
  
  /** The students in the course. */
  private String students;
  
  /** The enrollment for this course. */
  private int enrollment;
  
  /** The total enrollment for all courses. */
  private static int totalEnrollment;
  
  /**
   * Get the name of the course.
   */
  public String getCourseName() {
    return this.name;
  }
  
  /**
   * Get the name of the instructor.
   */
  public String getInstructor() {
    return this.instructor;
  }
  
  /**
   * Get the students enrolled in the course.
   */
  public String getStudents() {
    return this.students;
  }
  
  /**
   * Get the course enrollment.
   */
  public int getEnrollment() {
    return this.enrollment;
  }

  /**
   * Update the enrollment with the given class list s,
   * and enrollment figure e, and
   * adjust the total enrollment accordingly.
   */
  public void updateEnrollment(String s, int e) {
    this.students = s;
    this.totalEnrollment = this.totalEnrollment - this.enrollment + e;
    this.enrollment = e;
  }
}
