@@ -0,0 +1,2659 @@
+// Copyright 2020 Google LLC%0A//%0A// Licensed under the Apache License, Version 2.0 (the %22License%22);%0A// you may not use this file except in compliance with the License.%0A// You may obtain a copy of the License at%0A//%0A//     https://www.apache.org/licenses/LICENSE-2.0%0A//%0A// Unless required by applicable law or agreed to in writing, software%0A// distributed under the License is distributed on an %22AS IS%22 BASIS,%0A// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A// See the License for the specific language governing permissions and%0A// limitations under the License.%0A%0Apackage com.google.sps.data;%0A%0Aimport java.util.List;%0Aimport java.util.Objects;%0A%0A/**%0A * A class representing a course that has been added to a schedule.%0A */%0Apublic class ScheduledCourse %7B%0A  private String name;%0A  private String courseID;%0A  private String subject;%0A  private float credits;%0A  private boolean isRequired;%0A  private Section section;%0A%0A  /**%0A   * Constructor for the Scheduled Course object.%0A   * @param name The course name.%0A   * @param courseID The course ID.%0A   * @param subject The course subject.%0A   * @param credits The number of credits the course is worth.%0A   * @param isRequired Whether or not the course is required.%0A   * @param section The course's section (professor and times).%0A   */%0A  public ScheduledCourse(String name, String courseID, String subject, float credits, %0A      boolean isRequired, Section section) %7B%0A    this.name = name;%0A    this.courseID = courseID;%0A    this.subject = subject;%0A    this.credits = credits;%0A    this.isRequired = isRequired;%0A    this.section = section;%0A  %7D%0A%0A  public String getName() %7B%0A    return this.name;%0A  %7D%0A%0A  public String getCourseID() %7B%0A    return this.courseID;%0A  %7D%0A%0A  public String getSubject() %7B%0A    return this.subject;%0A  %7D%0A%0A  public float getCredits() %7B%0A    return this.credits;%0A  %7D%0A%0A  public boolean isRequired() %7B%0A    return this.isRequired;%0A  %7D%0A%0A  public Section getSection() %7B%0A    return this.section;%0A  %7D%0A%0A  @Override%0A  public boolean equals(Object other) %7B%0A    if (other == this) %7B%0A      return true;%0A    %7D%0A%0A    if (!(other instanceof ScheduledCourse)) %7B%0A      return false;%0A    %7D%0A%0A    ScheduledCourse otherCourse = (ScheduledCourse) other;%0A    return otherCourse.name.equals(this.name) %0A        && otherCourse.courseID.equals(this.courseID)%0A        && otherCourse.subject.equals(this.subject) %0A        && Math.abs(otherCourse.credits - this.credits) %3C 0.01%0A        && otherCourse.isRequired == this.isRequired %0A        && otherCourse.section.equals(this.section);%0A  %7D%0A%0A  @Override%0A  public int hashCode() %7B%0A    return Objects.hash(name, courseID, subject, credits, isRequired, section);%0A  %7D%0A%0A%7D%0A

create ScheduledCourse class to represent courses in a schedule vs. courses to be permuted