public enum Department extends java.lang.Enum<Department>
Student to represent major,
and by Course to represent school.
The value UNDECLARED is only to be used by the Student class,
and not by the Course class, as every course must have a defined department.
| Enum Constant and Description |
|---|
ART
Art
|
BIO
Biology
|
CS
Computer Science
|
DE
German
|
EDU
Education
|
FR
French
|
IT
Information Technology
|
MAT
Mathematics
|
MED
Medicine
|
SOC
Sociology
|
UNDECLARED
(No major)
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toString()
Represents the department with a descriptive name.
|
static Department |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Department[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Department UNDECLARED
public static final Department EDU
public static final Department BIO
public static final Department CS
public static final Department IT
public static final Department MAT
public static final Department MED
public static final Department ART
public static final Department SOC
public static final Department FR
public static final Department DE
public static Department[] values()
for (Department c : Department.values()) System.out.println(c);
public static Department valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic java.lang.String toString()
toString in class java.lang.Enum<Department>