Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
this contain bool and object and an array not only number
this has got to be in the top 5 worst kata of all time
I like this Kata. I've never come across kata design patterns
I agree! It's the one that actually does what's asked instead of filtering out everything that's not a number.
I agree mostly, but the instructions do say that the incoming data is lists of non-nengative integers and strings. So the arrays have two types of data. So either way accomplishes the goal. However I do prefer to filter our strings for the reason mentioned that in the future should more data types be added then this function still does it's task without changes. Since the task was to remove strings and not return numbers. The top rated one would require rework to function correctly if other data types were added in the future, so I fail to see why it's "best practice"
The image in the description is dead.
Not working?
what a kata
I definitely agree, since the instructions say "with the strings filtered out", not "with only the integers returned". The other solutions seem to just be passing the test cases, as opposed to fully following the instructions. Perhaps a random test with different data-types could be added?
I like this approach in part because it filters out strings rather than returning numbers.
This code can be used on arrays that contain more data types than just Strings and Numbers,
and will return the array less the Strings.
The image in the description is dead.
Can't see the UML because the image is not longer available :)
The definition for Goose is not correct, the method with out body seems like definition for interface.
public class Goose
{
string Honk();
void Fly();
}
The description is bad: There are only 3 lines describing the actual tasks and they aren't even indicative (
create new concrete behavior classes to fully take advantage of the Strategy Pattern and the Duck Class below
, okay, but how? What to do? And how it's tested?). Then it's pages of information that looks like it's dumped from a tutorial page somewhere, without emphasising the key points of the concept. If I want to read something like that I can directly read off the Wikipedia page or something, no need for you to reproduce the whole article.(Besides, what you did is just putting the top 3 google search result of "C# strategy pattern" in the links section. Do you think this is an subtitute for actually explaining how to do it by any stretch? It's lazy and responsible, to the least.)
The emphasis and relative portions of the descriptions is unbalanced and it needs refactoring.
This comment is hidden because it contains spoiler information about the solution
Loading more items...