// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.sps.data;

import java.util.Collections;
import java.util.List;

public class Section {
    private String professor;
    private List<TimeRange> meetingTimes;
    // Meeting times will be sorted in ascending order of time, 
    // with the first lesson being first in the list

    public Section(String professor, List<TimeRange> meetingTimes){
        this.professor = professor;
        this.meetingTimes = meetingTimes;
        Collections.sort(this.meetingTimes, TimeRange.ORDER_BY_START);

        for(int i = 0; i < meetingTimes.size() - 1; i++){
          if(meetingTimes.get(i).overlaps(meetingTimes.get(i + 1))) {
            throw new IllegalArgumentException("A section's lecture times can't overlap!");
          }
        }
    }

    /**
     * Function to return whether or not a section overlaps with another
     * @param other
     * @return If there's overlap between the current section and the other section
     */
    public boolean overlaps(Section other){
        //TODO: This
        return false;
    }
}
@@ -723,50 +723,8 @@
 or;%0A
-    private List%3CTimeRange%3E meetingTimes;%0A
     
@@ -836,16 +836,58 @@
 the list
+%0A    private List%3CTimeRange%3E meetingTimes;
 %0A%0A    pu

Change comment location re: comments