-
-
Notifications
You must be signed in to change notification settings - Fork 19
Implementation of analyzer
for wizards-and-warriors-2
#262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Implementation of analyzer
for wizards-and-warriors-2
#262
Conversation
|
||
/** | ||
* @author: chiarazarrella | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need to tell students to use method overloading - the exercise has been designed so that the GameMaster.describe
must be overloaded. So, all passing solutions should already be using method overload to pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at your tests for the "not use", "partial" and "use string format not use" method overloading, I'm a little confused into how method overloading isn't being used in their samples because the describe
method is overloaded (defined multiple times, with different parameter types). Did you mean reuse method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! I see; what I meant was to exploit method overloading and yes, it is done indeed by reusing the methods.
However, I have noticed that it already exists something similar, the reuse_code comment. Should this be used instead? Or is it enough to only modify the name of the comment from use_method_overloading
to reuse_method
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, if we can, we should use the same reuse_code
comment. The comment needs to be specific about which describe method it should use though because all the methods are named describe
. I'd suggest including the parameter's type in the comment. For example:
The describe(Character, Destination)
method should reuse the logic implemented in describe(Character, Destination, TravelMethod)
. Reusing existing methods can help make code easier to maintain.
The methods can be passed as parameters to the comment (see AnalyzerIntegrationTest.loglevels.NoReuseOfBothMethods.approved.txt for an example).
Implementation and testing of the analyzer for the concept exercise
wizards-and-warriors-2
.Closes #116
ToDo: