From c019d92b128e94acc4772daef70e189a0181f011 Mon Sep 17 00:00:00 2001 From: chiarazarrella Date: Fri, 11 Apr 2025 11:39:44 +0200 Subject: [PATCH 1/2] add comment for analyzer wizards-and-warriors-2 --- .../java/wizards-and-warriors-2/use_method_overloading.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 analyzer-comments/java/wizards-and-warriors-2/use_method_overloading.md diff --git a/analyzer-comments/java/wizards-and-warriors-2/use_method_overloading.md b/analyzer-comments/java/wizards-and-warriors-2/use_method_overloading.md new file mode 100644 index 000000000..d6e0de444 --- /dev/null +++ b/analyzer-comments/java/wizards-and-warriors-2/use_method_overloading.md @@ -0,0 +1,5 @@ +# use method overloading + +Consider reusing the existing `describe` methods instead of manually constructing the description. + +This promotes better code reuse and aligns with the intended use of method overloading. \ No newline at end of file From 8c4a4a40234618401c427c60905a0768b7dfa76c Mon Sep 17 00:00:00 2001 From: chiarazarrella Date: Mon, 5 May 2025 15:24:40 +0200 Subject: [PATCH 2/2] new comments for wizards-and-warriors-2 --- .../reuse_code_hardcoded_three_parameters.md | 3 +++ .../reuse_code_hardcoded_two_parameters.md | 4 ++++ .../java/wizards-and-warriors-2/use_method_overloading.md | 5 ----- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 analyzer-comments/java/wizards-and-warriors-2/reuse_code_hardcoded_three_parameters.md create mode 100644 analyzer-comments/java/wizards-and-warriors-2/reuse_code_hardcoded_two_parameters.md delete mode 100644 analyzer-comments/java/wizards-and-warriors-2/use_method_overloading.md diff --git a/analyzer-comments/java/wizards-and-warriors-2/reuse_code_hardcoded_three_parameters.md b/analyzer-comments/java/wizards-and-warriors-2/reuse_code_hardcoded_three_parameters.md new file mode 100644 index 000000000..c062ef889 --- /dev/null +++ b/analyzer-comments/java/wizards-and-warriors-2/reuse_code_hardcoded_three_parameters.md @@ -0,0 +1,3 @@ +# Reuse code + +The `describe(Character, Destination, TravelMethod)` method should reuse the logic implemented in `describe(Character)`, `describe(Destination)` and `describe(TravelMethod)`. Reusing existing methods can help make code easier to maintain. diff --git a/analyzer-comments/java/wizards-and-warriors-2/reuse_code_hardcoded_two_parameters.md b/analyzer-comments/java/wizards-and-warriors-2/reuse_code_hardcoded_two_parameters.md new file mode 100644 index 000000000..48f54a2fe --- /dev/null +++ b/analyzer-comments/java/wizards-and-warriors-2/reuse_code_hardcoded_two_parameters.md @@ -0,0 +1,4 @@ +# Reuse code + +The `describe(Character, Destination)` method should reuse the logic implemented in `describe(Character, Destination, TravelMethod)` or in the individual methods `describe(Character)`, `describe(Destination)`, `describe(TravelMethod)`. +Reusing existing methods can help make code easier to maintain. \ No newline at end of file diff --git a/analyzer-comments/java/wizards-and-warriors-2/use_method_overloading.md b/analyzer-comments/java/wizards-and-warriors-2/use_method_overloading.md deleted file mode 100644 index d6e0de444..000000000 --- a/analyzer-comments/java/wizards-and-warriors-2/use_method_overloading.md +++ /dev/null @@ -1,5 +0,0 @@ -# use method overloading - -Consider reusing the existing `describe` methods instead of manually constructing the description. - -This promotes better code reuse and aligns with the intended use of method overloading. \ No newline at end of file