Skip to content

Commit

Permalink
Append studentid for class list students
Browse files Browse the repository at this point in the history
  • Loading branch information
qinxutan committed Apr 10, 2024
1 parent 2c1f4ef commit 4816e14
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public CommandResult execute(Model model) throws CommandException {
StringBuilder result = new StringBuilder();
result.append("Module: ").append(module).append(", Tutorial Class: ")
.append(tutorialClass).append("\nStudents: ");
existingTutorialClass.getStudents().forEach(student -> result.append(student.getName()).append(", "));
existingTutorialClass.getStudents().forEach(student -> result.append(student.getName())
.append(" (ID: ").append(student.getStudentId()).append("), "));
model.getAddressBook().setStudentsInTutorialClass(existingTutorialClass);
return new CommandResult(result.toString().trim());
}
Expand Down

0 comments on commit 4816e14

Please sign in to comment.