Skip to content

Code review#200

Open
Tanvipatel23 wants to merge 6 commits intokscanne:masterfrom
Tanvipatel23:tanvi
Open

Code review#200
Tanvipatel23 wants to merge 6 commits intokscanne:masterfrom
Tanvipatel23:tanvi

Conversation

@Tanvipatel23
Copy link
Copy Markdown

No description provided.

@@ -0,0 +1,30 @@
new Locale(language)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I would be great if we write them in a class, as new a key word to generate memory

new Locale(language, country)
new Locale(language, country, variant)

class JavaCharactertoLowerCaseExample1 {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It would be easy to read or reuse if we give variable short.

@@ -0,0 +1,30 @@
new Locale(language)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

import statement may help in importing local languages

Locale trlocale= new Locale("tr-TR");
Locale enLocale = new Locale("en_US");

Log.v("mainlist", "en source: " +myString.toLowerCase(enLocale));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

it would be great if we place them in a class


String myString="YAŞAT Patel";
Locale trlocale= new Locale("tr-TR");
Locale enLocale = new Locale("en_US");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

may be import statements may help in importing language.

return s2.replaceAll("(?s)\\p{InCombiningDiacriticalMarks}", "");

char ch1, ch2, ch3, ch4;
ch1 = 'TANVI';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

hard code may not help if we want to use different word it would be great if we use flexible

// A class to convert the case of a character and a given string
public class CharacterCaseConverter {

public static void main(String[] args) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I'd like to see a function or method that takes two arguments, the string to lowercase, and a string representing the BCP-47 code, as described in the homework specification. The function should return the lowercase version of the string, that's all. What you have here is not doing that.

{"a" : 3, "b" : 4, "c" : 5} scalene
{"a" : 3, "b" : 3, "c" : 1} isosceles
{"a" : 3, "b" : 4, "c" : 100} error
/*
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Please see the instructions for the assignment. You were supposed to follow the same format as the three example lines.

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.

4 participants