Skip to content

Commit

Permalink
Change Type of value in Faculty.java
Browse files Browse the repository at this point in the history
Change the type of value to String.
  • Loading branch information
JerryWang0000 committed Mar 14, 2024
1 parent 727040a commit 077c6fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/staffconnect/model/person/Faculty.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public String getFacultyName() {
return facultyName;
}
}
private final FacultyEnum value;
public final String value;

/**
* Constructs a {@code Faculty}.
Expand All @@ -62,7 +62,7 @@ public String getFacultyName() {
public Faculty(String faculty) {
requireNonNull(faculty);
checkArgument(isValidFaculty(faculty), MESSAGE_CONSTRAINTS);
value = fromString(faculty);
value = fromString(faculty).getFacultyName(); // can be extended
}

/**
Expand All @@ -89,7 +89,7 @@ private static FacultyEnum fromString(String name) {

@Override
public String toString() {
return value.getFacultyName();
return value;

Check warning on line 92 in src/main/java/staffconnect/model/person/Faculty.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/staffconnect/model/person/Faculty.java#L92

Added line #L92 was not covered by tests
}

@Override
Expand Down

0 comments on commit 077c6fe

Please sign in to comment.