Conversation
c21fa4e to
5c04832
Compare
# Conflicts: # src/main/java/homework_1/Main.java
| int row = Integer.parseInt(arrayWithInputData[0]); | ||
| int column = Integer.parseInt(arrayWithInputData[1]); | ||
|
|
||
| String typeOfParity = arrayWithInputData[2]; |
There was a problem hiding this comment.
where do you check that you have arrayWithInputData.length >= 3 ?
ArrayIndexOutOfBoundsException
| System.out.println(ANSI_STRIKEOUT_YELLOW + "Yellow" + ANSI_RESET); | ||
| } else { | ||
| System.out.println(ANSI_STRIKEOUT_RED + "Red" + ANSI_RESET); | ||
| } |
There was a problem hiding this comment.
Does not match the condition of the task
private void checkColor(int time) {
if(time < 0 || time >= 86400) return;
int sec = time % 60;
if(sec < 35) {
System.out.println(ANSI_STRIKEOUT_GREEN + "Green" + ANSI_RESET);
} else if(sec < 40 || sec >= 55) {
System.out.println(ANSI_STRIKEOUT_YELLOW + "Yellow" + ANSI_RESET);
} else {
System.out.println(ANSI_STRIKEOUT_RED + "Red" + ANSI_RESET);
}
There was a problem hiding this comment.
Does not match the condition of the task
private void checkColor(int time) { if(time < 0 || time >= 86400) return; int sec = time % 60; if(sec < 35) { System.out.println(ANSI_STRIKEOUT_GREEN + "Green" + ANSI_RESET); } else if(sec < 40 || sec >= 55) { System.out.println(ANSI_STRIKEOUT_YELLOW + "Yellow" + ANSI_RESET); } else { System.out.println(ANSI_STRIKEOUT_RED + "Red" + ANSI_RESET); }
What's wrong?
There was a problem hiding this comment.
my bad. sry. your way of writing is confusing.
if(time < 0 || time >= 86400) return;
but all ok.
| |HW4 | [singleton](https://github.com/NikolaevArtem/Java_Core_June_2021/tree/feature/AntonSegodnik/src/main/java/homework_4/singleton) | The singleton app | | ||
| |HW5 | [customRegexMatcher](https://github.com/NikolaevArtem/Java_Core_June_2021/tree/feature/AntonSegodnik/src/main/java/homework_5/customRegexMatcher) | The app | | ||
| |HW5 | [PowerOfNumber](https://github.com/NikolaevArtem/Java_Core_June_2021/tree/feature/AntonSegodnik/src/main/java/homework_5/PowerOfNumber) | The app | | ||
| |HW6 | [MapProblemsCollisionGenerator](https://github.com/NikolaevArtem/Java_Core_June_2021/tree/feature/AntonSegodnik/src/main/java/homework_6/MapProblemsCollisionGenerator) | The app | | ||
| |HW6 | [MapProblemsMutableGenerator](https://github.com/NikolaevArtem/Java_Core_June_2021/tree/feature/AntonSegodnik/src/main/java/homework_6/MapProblemsMutableGenerator) | The app | | ||
| |HW7 | [KittenToCatFunction](https://github.com/NikolaevArtem/Java_Core_June_2021/tree/feature/AntonSegodnik/src/main/java/homework_7) | The app | |
|
|
||
| public static void main(String[] args) { | ||
|
|
||
| StartGame startGame = new StartGame(); |
There was a problem hiding this comment.
Looks like a fresh view on the course project, fits the requirement, but doesn't look good, not from the interface and not from the code. You show knowledge in Java Core, I don't see much architecture or right abstractions in the app. Playing is nice though, but x for miss and X for hit looks awful...
Approved!
| // Deep Copy of objects should be performed in the getter methods (To return a copy rather than returning the actual object reference) | ||
| // No setters (To not have the option to change the value of the instance variable) | ||
|
|
||
| public final class ImmutableClass { |
There was a problem hiding this comment.
One field should be mutable
| public class Main { | ||
|
|
||
| public static void main(String[] args) { | ||
| String path = "src/main/resources/custom_file_reader.txts"; |
| // System.out.println (powerOfNumber.recursion (2, 2)); | ||
| // System.out.println (powerOfNumber.recursion (2, 1)); | ||
| // System.out.println (powerOfNumber.recursion (2, 0)); | ||
| // System.out.println (powerOfNumber.recursion (0, 2)); | ||
| // System.out.println (Math.pow(2,2)); | ||
| // System.out.println (Math.pow(2,1)); | ||
| // System.out.println (Math.pow(2,0)); | ||
| // System.out.println (Math.pow(0,2)); |
|
|
||
| import java.util.HashMap; | ||
|
|
||
| public class Main { |
NikolaevArtem
left a comment
There was a problem hiding this comment.
Hm... you did the homework (except minor fixes in HW_3), but mostly it just fits the requirements in the easiest way possible. It seems you didn't really like working with code
Ping me when you fix HW_3
| private ImmutableClass createNewObj() { | ||
| return new ImmutableClass(); | ||
| } |
There was a problem hiding this comment.
There's no purpose for this method. Doesn't fit the criteria
There was a problem hiding this comment.
Yep, should i just make this method as public or this method must accept any values ? (Made as public)
Homework_1