📄 sectiondetails.java
字号:
package Entities;
import dslib.list.LinkedListUos;
/** Represents the details of a course section. */
public class SectionDetails
{
/** The total number of student allowed in that class */
protected int limit;
/** The time the course is offered */
protected String timeOffered;
/** The days the course is offered */
protected String daysOffered;
/** The trem the classes is offered */
protected int term;
/** Make a new course section from the arguments */
public SectionDetails(int termNum, String time, String day, int limits)
{
term = termNum;
timeOffered = time;
daysOffered = day;
limit = limits;
}
/** Set the enrollment limit for this section */
public void setLimit(int newLimit)
{
limit = newLimit;
}
/** Return a string representation of the section */
public String toString()
{
String result = "\nTerm : " + term;
result += "\nTime : " + timeOffered;
result += "\nDays : " + daysOffered;
result += "\nEnrollment Limit : " + limit + "\n";
return result;
}
/** Return the total number of student allowed in that class */
public int limit()
{
return limit;
}
/** Return tThe time the course is offered */
public String timeOffered()
{
return timeOffered;
}
/** Return the days the course is offered */
public String daysOffered()
{
return daysOffered;
}
/** Return the trem the classes is offered */
public int term()
{
return term;
}
} /* end of CourseSection */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -