Skip to content

Gikwon work submit#21

Open
jkwon100 wants to merge 1 commit intoSWE-CS410:mainfrom
jkwon100:main
Open

Gikwon work submit#21
jkwon100 wants to merge 1 commit intoSWE-CS410:mainfrom
jkwon100:main

Conversation

@jkwon100
Copy link

No description provided.

@jkwon100 jkwon100 requested a review from sarafarag June 15, 2023 23:55
@sarafarag sarafarag requested review from pnarasimhan2021 and removed request for sarafarag June 16, 2023 00:07
Copy link

@pnarasimhan2021 pnarasimhan2021 left a comment

Choose a reason for hiding this comment

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

Everything looks on point, especially your test suite! Nice job covering all the test cases.

@sarafarag sarafarag requested a review from Monica20030707 June 17, 2023 01:59
Copy link

@Monica20030707 Monica20030707 left a comment

Choose a reason for hiding this comment

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

I can see that all the test case is good, even covering the Exception cases.
However, in getString(), it would be nicer if you can make some minor changes to cover the null case with some if else statement. besides that, I think you are okay to merge.
I will give you a merge after your change.

Copy link
Author

@jkwon100 jkwon100 left a comment

Choose a reason for hiding this comment

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

thanks for the review. I think I have made new push with the change of getString() method.

Copy link

@Monica20030707 Monica20030707 left a comment

Choose a reason for hiding this comment

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

Thank you for changing it.

public String[] getSubStrings(int startWord, int endWord) {
return null;
public String[] getSubStrings(int startWord, int endWord){
if (startWord <= 0 || endWord <= 0 || startWord > endWord) throw new IllegalArgumentException("invalid input for index");

Choose a reason for hiding this comment

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

I also did write the same things as you before I get a reviewer to say that it would be better for user if you can make the case startWord > endWord with a different if case so that you can throw a more specific error for that case.

@Monica20030707
Copy link

To be honest, your algorithm is looks just the same like everybody, even me, and we, me and Priyanka, do say your test case covers everything include error cases to throw Exception, so I don't know how I can make 5 reviews for this :)

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