Skip to content

Develop#1

Open
fisgeci wants to merge 2 commits into
masterfrom
develop
Open

Develop#1
fisgeci wants to merge 2 commits into
masterfrom
develop

Conversation

@fisgeci
Copy link
Copy Markdown
Owner

@fisgeci fisgeci commented Nov 4, 2021

No description provided.

Celonis added 2 commits November 4, 2021 11:32
This reverts commit 20dc570, reversing
changes made to 9f27e7f.
@fisgeci fisgeci closed this Nov 4, 2021
@fisgeci fisgeci reopened this Nov 4, 2021
Comment thread Class1.java
public class Class1 {
public final String SPECIAL_CHARACTER = "a";
public List<String> method(String paragraph) {
Copy link
Copy Markdown
Owner Author

@fisgeci fisgeci Nov 4, 2021

Choose a reason for hiding this comment

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

change method name to something more descriptive of what the method does(i.e. getShortestWordsWithAInEachSentece)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

also get as input the character u wanna check for so that it is more general.

Comment thread Class1.java
public String findFirstShortWordStartingWithA(String paragraph) {
List<String> shortestWordsWithA = method(paragraph);
String firstShortWordStartingWithA = "";
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Doesn't make sense to assign a empty String, maybe it would be better to start form the first element in the list.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

and the naming of this doesn't rly fit in with what the variable represents. I would suggest to rename it to shortestWordWithA

Comment thread Class1.java
import java.util.Collections;
public class Class1 {
public final String SPECIAL_CHARACTER = "a";
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

this isn't needed in my opinion.

Comment thread Class1.java
return shortestWords;
}
public String findShortestWordWithA(String paragraph) {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Update to give as input the special character as well so that it is more general.

Comment thread Class1.java
}
public String findFirstShortWordStartingWithA(String paragraph) {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

same as line 32

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.

1 participant