Skip to content

will_eand added Junit implementation#7

Open
will-eand wants to merge 2 commits intomainfrom
will_eand_codereview
Open

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

Conversation

@will-eand
Copy link

this is a pull request?

@sarafarag sarafarag requested a review from FLSGawsl June 14, 2023 18:26
@will-eand
Copy link
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;

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;

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;

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

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.

Copy link

@FLSGawsl FLSGawsl left a comment

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