Попытался сделать. Явно получилось не так как надо, во втором задании…#22
Open
dmithorzh wants to merge 4 commits intoiaulitin:masterfrom
Open
Попытался сделать. Явно получилось не так как надо, во втором задании…#22dmithorzh wants to merge 4 commits intoiaulitin:masterfrom
dmithorzh wants to merge 4 commits intoiaulitin:masterfrom
Conversation
… я вообще не понял как реализовать метод goRotten, почитал про java timer, но не понял как имплементировать его в данном случае, если это вообще возможно.
iaulitin
reviewed
Oct 28, 2021
|
|
||
|
|
||
| double real; | ||
| double imaginary; |
iaulitin
reviewed
Oct 28, 2021
src/ru/milandr/courses/complexnumber/tkhorzhevskiy/ComplexNumber.java
Outdated
Show resolved
Hide resolved
src/ru/milandr/courses/complexnumber/tkhorzhevskiy/ComplexNumber.java
Outdated
Show resolved
Hide resolved
| } | ||
| @Override | ||
| public String toString() { | ||
| return this.getName(); |
Owner
There was a problem hiding this comment.
Тут то же самое про геттеры, на самом деле. Ты же можешь к полю обращаться напрямую - зачем вызывать геттер?
src/ru/milandr/courses/farm/tkhorzhevskiy/goods/ParentGood.java
Outdated
Show resolved
Hide resolved
iaulitin
reviewed
Oct 31, 2021
| @@ -0,0 +1,37 @@ | |||
| package ru.milandr.courses.farm.tkhorzhevskiy; | |||
Owner
There was a problem hiding this comment.
По всем своим классам автоформатированием пройтись, так не годится
| import ru.milandr.courses.farm.tkhorzhevskiy.goods.Meat; | ||
|
|
||
| public class Pig extends ParentAnimal { | ||
| private static final String PigName = "Свинья"; |
Owner
There was a problem hiding this comment.
Мы этого еще пока не проходили, но константы static final в Джаве пишутся в UPPER_CAMEL_CASE. Надо поправить везде, где используешь их.
| public void produceSound() { | ||
| System.out.println("Какой то звук"); | ||
|
|
||
| } |
Owner
There was a problem hiding this comment.
А чего абстрактным не сделал?
И опять пустые строки
| @Override | ||
| public Good produceGoods() { | ||
| return null; | ||
| } |
Owner
There was a problem hiding this comment.
Тоже абстрактным можно сделать.
| } | ||
| @Override | ||
| public String toString() { | ||
| return this.getName(); |
…внести изменения в интерфейс.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Попытался сделать. Явно получилось не так как надо, во втором задании я вообще не понял как реализовать метод goRotten, почитал про java timer, но не понял как имплементировать его в данном случае, если это вообще возможно.