001package org.cpsolver.studentsct.online; 002 003import java.util.List; 004 005import org.cpsolver.coursett.model.Placement; 006import org.cpsolver.studentsct.model.Instructor; 007import org.cpsolver.studentsct.model.Section; 008import org.cpsolver.studentsct.model.Subpart; 009 010/** 011 * An online section. A simple extension of the {@link Section} class that allows to set the current section enrollment. 012 * This class is particularly useful when a model containing only the given student is constructed (to provide him/her with a schedule or suggestions). 013 * 014 * @version StudentSct 1.3 (Student Sectioning)<br> 015 * Copyright (C) 2014 Tomáš Müller<br> 016 * <a href="mailto:muller@unitime.org">muller@unitime.org</a><br> 017 * <a href="http://muller.unitime.org">http://muller.unitime.org</a><br> 018 * <br> 019 * This library is free software; you can redistribute it and/or modify 020 * it under the terms of the GNU Lesser General Public License as 021 * published by the Free Software Foundation; either version 3 of the 022 * License, or (at your option) any later version. <br> 023 * <br> 024 * This library is distributed in the hope that it will be useful, but 025 * WITHOUT ANY WARRANTY; without even the implied warranty of 026 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 027 * Lesser General Public License for more details. <br> 028 * <br> 029 * You should have received a copy of the GNU Lesser General Public 030 * License along with this library; if not see <a href='http://www.gnu.org/licenses'>http://www.gnu.org/licenses</a>. 031 * 032 */ 033public class OnlineSection extends Section { 034 private int iEnrollment = 0; 035 036 public OnlineSection(long id, int limit, String name, Subpart subpart, Placement placement, List<Instructor> instructors, Section parent) { 037 super(id, limit, name, subpart, placement, instructors, parent); 038 } 039 040 @Deprecated 041 public OnlineSection(long id, int limit, String name, Subpart subpart, Placement placement, String instructorIds, String instructorNames, Section parent) { 042 super(id, limit, name, subpart, placement, instructorIds, instructorNames, parent); 043 } 044 045 /** 046 * Set current enrollment 047 * @param enrollment current enrollment 048 */ 049 public void setEnrollment(int enrollment) { iEnrollment = enrollment; } 050 051 /** 052 * Get current enrollment 053 * @return current enrollment 054 */ 055 public int getEnrollment() { return iEnrollment; } 056}