enrollmentstatus.java
来自「学生注册系统SRS 允许学生在线注册每学期的课程并记录学位完成的进度」· Java 代码 · 共 31 行
JAVA
31 行
// EnrollmentStatus.java - Chapter 14, Java 5 version.
// Copyright 2005 by Jacquie Barker - all rights reserved.
// A SUPPORT enum.
// Used by the Section class to represent various possible outcomes of
// an attempt to enroll by a Student.
public enum EnrollmentStatus {
// Enumerate the values that the enum can assume.
success("Enrollment successful! :o)"),
secFull("Enrollment failed; section was full. :op"),
prereq("Enrollment failed; prerequisites not satisfied. :op"),
prevEnroll("Enrollment failed; previously enrolled. :op");
// This represents the value of an enum instance.
private final String value;
// A "constructor" of sorts (used above).
EnrollmentStatus(String value) {
this.value = value;
}
// Accessor for the value of an enum instance.
public String value() {
return value;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?