-
Notifications
You must be signed in to change notification settings - Fork 0
Core work8 #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Core work8 #20
Conversation
# Conflicts: # src/ru/skypro/Main.java
# Conflicts: # src/ru/skypro/Main.java
src/ru/skypro/products/Tovar.java
Outdated
|
|
||
| import java.util.Objects; | ||
|
|
||
| public class Tovar { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tovar --> Product
src/ru/skypro/transport/DriverD.java
Outdated
| import ru.skypro.exceptions.WrongRightsException; | ||
|
|
||
| public class DriverD extends Driver{ | ||
| public DriverD(String fio, Boolean haveRights, Integer stazh, Bus transport) throws WrongRightsException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stazh ---> experience
|
|
||
| private List<Mechanic> mechanicList = new ArrayList<>(); | ||
|
|
||
| private Driver driver; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут должен быть список всех всех потенциальных водетелей
src/ru/skypro/products/Recept.java
Outdated
|
|
||
| Set<Product> setProducts = new HashSet<>(); | ||
| private final String name; | ||
| public Integer SumCostProducts(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SumCostProducts - метод большой буквы. lowerCamelCase
src/ru/skypro/products/Recept.java
Outdated
| } | ||
|
|
||
| public void addToSet(Product val){ | ||
| setProducts.add(val); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
проверка на то, что такой продукт существует?
src/ru/skypro/products/Product.java
Outdated
| public boolean equals(Object o) { | ||
| if (this == o) return true; | ||
| if (!(o instanceof Product product)) return false; | ||
| return Objects.equals(cost, product.cost) && Objects.equals(weight, product.weight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
сравнение по цене? Мне кажется это неправильно.
src/ru/skypro/Main.java
Outdated
| Random r = new Random(); | ||
| int int1 = r.nextInt(7)+2; | ||
| int int2 = r.nextInt(7)+2; | ||
| uniqueQuestion.add(int1 + "*" + int2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
нет проверки на зеркальные примеры, например 34 и 43
| Random r = new Random(); | ||
| int int1 = r.nextInt(7)+2; | ||
| int int2 = r.nextInt(7)+2; | ||
| if (!uniqueQuestion.contains(int2 + "*" + int1)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
нет проверки на зеркальный пример
No description provided.