Skip to content

will_eand added Junit implementation#7

Open
will-eand wants to merge 2 commits into
mainfrom
will_eand_codereview
Open

will_eand added Junit implementation#7
will-eand wants to merge 2 commits into
mainfrom
will_eand_codereview

Conversation

@will-eand

Copy link
Copy Markdown

this is a pull request?

@sarafarag
sarafarag requested a review from FLSGawsl June 14, 2023 18:26
Comment thread src/main/java/StringManipulation.java
Comment thread src/main/java/StringManipulation.java Outdated
Comment thread src/main/java/StringManipulation.java Outdated
Comment thread src/main/java/StringManipulation.java Outdated
Comment thread src/main/java/StringManipulation.java Outdated
Comment thread src/main/java/StringManipulation.java
@will-eand

Copy link
Copy Markdown
Author

I re-pushed after reviewing the changes FLSGawsi. I have a new commit to document these fixes for my Unit Assignment

@Override
public String getString() {
return null;
return message;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Naming: The variable names are meaningful and descriptive, making the code more readable.

for (int i = 0; i < array.size(); i++) {
a = a + array.get(i);
}
return a;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The removeNthCharacter method correctly removes every nth character from the string while maintaining spacing as specified.

for (int i = startWord - 1; i < endWord; i++) {
finalStringArray[count++] = tempStringArray[i];
}
return finalStringArray;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There's an unnecessary conversion to an intermediate ArrayList that can be avoided by using an array directly.

}
return finalString;
}
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Using a HashMap is a good approach to storing the character values associated with indices.

@FLSGawsl FLSGawsl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overall, the code implements the required functionality.

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.

3 participants