Skip to content
This repository was archived by the owner on Oct 25, 2021. It is now read-only.

Anton_Segodnik#28

Open
AntonSegodnik wants to merge 39 commits intomasterfrom
feature/AntonSegodnik
Open

Anton_Segodnik#28
AntonSegodnik wants to merge 39 commits intomasterfrom
feature/AntonSegodnik

Conversation

@AntonSegodnik
Copy link
Collaborator

Homework_1

@AntonSegodnik AntonSegodnik force-pushed the feature/AntonSegodnik branch from c21fa4e to 5c04832 Compare July 9, 2021 20:11
Anton.Segodnik added 2 commits July 9, 2021 23:14
# Conflicts:
#	src/main/java/homework_1/Main.java
@AntonSegodnik AntonSegodnik added the readyForReview Sign for Artem to take a look label Jul 9, 2021
@NikolaevArtem NikolaevArtem added HW_1 Good to go and removed readyForReview Sign for Artem to take a look labels Jul 11, 2021
@NikolaevArtem NikolaevArtem changed the title Feature/anton segodnik Anton_Segodnik Jul 11, 2021
@AntonSegodnik AntonSegodnik added the readyForReview Sign for Artem to take a look label Jul 14, 2021
@NikolaevArtem NikolaevArtem removed the readyForReview Sign for Artem to take a look label Jul 20, 2021
@AntonSegodnik AntonSegodnik added the readyForReview Sign for Artem to take a look label Jul 25, 2021
@AntonSegodnik AntonSegodnik added the readyForReview Sign for Artem to take a look label Sep 6, 2021
int row = Integer.parseInt(arrayWithInputData[0]);
int column = Integer.parseInt(arrayWithInputData[1]);

String typeOfParity = arrayWithInputData[2];
Copy link
Collaborator

@filipchikkirill filipchikkirill Sep 7, 2021

Choose a reason for hiding this comment

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

where do you check that you have arrayWithInputData.length >= 3 ?
ArrayIndexOutOfBoundsException

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, fixed

System.out.println(ANSI_STRIKEOUT_YELLOW + "Yellow" + ANSI_RESET);
} else {
System.out.println(ANSI_STRIKEOUT_RED + "Red" + ANSI_RESET);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

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);
        }

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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?

Copy link
Collaborator

Choose a reason for hiding this comment

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

my bad. sry. your way of writing is confusing.
if(time < 0 || time >= 86400) return;

but all ok.

@NikolaevArtem NikolaevArtem removed bug Code fix needed readyForReview Sign for Artem to take a look readyForStudentReview labels Sep 22, 2021
Comment on lines +14 to +19
|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 |
Copy link
Owner

Choose a reason for hiding this comment

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

Nice description...


public static void main(String[] args) {

StartGame startGame = new StartGame();
Copy link
Owner

@NikolaevArtem NikolaevArtem Sep 22, 2021

Choose a reason for hiding this comment

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

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 {
Copy link
Owner

Choose a reason for hiding this comment

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

One field should be mutable

public class Main {

public static void main(String[] args) {
String path = "src/main/resources/custom_file_reader.txts";
Copy link
Owner

Choose a reason for hiding this comment

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

txts?

Comment on lines +6 to +13
// 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));
Copy link
Owner

Choose a reason for hiding this comment

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

What's this?


import java.util.HashMap;

public class Main {
Copy link
Owner

Choose a reason for hiding this comment

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

Good!

Copy link
Owner

@NikolaevArtem NikolaevArtem left a comment

Choose a reason for hiding this comment

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

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

Comment on lines 44 to 46
private ImmutableClass createNewObj() {
return new ImmutableClass();
}
Copy link
Owner

Choose a reason for hiding this comment

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

There's no purpose for this method. Doesn't fit the criteria

Copy link
Collaborator Author

@AntonSegodnik AntonSegodnik Sep 23, 2021

Choose a reason for hiding this comment

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

Yep, should i just make this method as public or this method must accept any values ? (Made as public)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants