Skip to content

Homework 5 second time#23

Open
frolovGeorgy wants to merge 8 commits intoiaulitin:masterfrom
frolovGeorgy:homework_5_second_time
Open

Homework 5 second time#23
frolovGeorgy wants to merge 8 commits intoiaulitin:masterfrom
frolovGeorgy:homework_5_second_time

Conversation

@frolovGeorgy
Copy link

No description provided.

this.name = name;
}

//стоит ли указывать наследуемый абстрактный метод, если здесь он не переписывается, или лучше сразу переписать в дочернем классе
Copy link
Owner

Choose a reason for hiding this comment

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

Дело вкуса.

Я бы не писал. Реализовал бы сразу в дочерних классах.


@Override
public String toString() {
return "мясо";
Copy link
Owner

Choose a reason for hiding this comment

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

Я бы вот эти имена еще в константы записал

@@ -0,0 +1,27 @@
package ru.milandr.courses.farm.frolov.animals;

import ru.milandr.courses.farm.Animal;
Copy link
Owner

Choose a reason for hiding this comment

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

unused import. Нужно поправить везде

@@ -0,0 +1,2 @@
1) Переопределяемый метод не может выбрасывать проверяемые исключения, которые выше по иерархии чем исключения в методе родительского класса.
Copy link
Author

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

Comments