Skip to content

Conversation

@iamAlimzhan
Copy link

No description provided.

}

public void addGrade(SimpsonsCharacter character, SimpsonsCourse course, int gradeValue){
if(gradeValue < 1 || gradeValue > 5){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Числа вынести в константы. Потому что сейчас это magic numbers


public void addGrade(SimpsonsCharacter character, SimpsonsCourse course, int gradeValue){
if(gradeValue < 1 || gradeValue > 5){
throw new IllegalArgumentException("Оценка должна быть между 1 и 5.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Какая была по факту?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants