This issue describes how to implement the case-statement concept exercise for the Java track.
Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:
Please also watch the following video:
The goal of this exercise is to teach the student how and when to use case statements in Java.
_NOTE:_ This may be forked from the C# switch-statement exercise.
case statements in JavaNothing to report
conditionals-caseclassesmethodsvariablesNothing to report
Nothing to report
This exercise does not require any specific representation logic to be added to the representer.
This exercise does not require any specific analyzer logic to be added to the analyzer.
To implement this exercise, please follow these instructions.
If you have any questions while implementing the exercise, please post the questions as comments in this issue.
I'll like to work on this.
Hi @InfiniteVerma your contribution is very appreciated, the issue is assigned to you
feel free to ask for every doubt
Hi @InfiniteVerma feel free to ask if you have some problem or doubt with the exercise
Sure! I apologize for the inactivity.
I think it is time to remove the assignment of this issue to permit others to try it.
@InfiniteVerma feel free to ask for re-assignment if you are working on it
Hello !
I would like to work on this issue, is it possible ?
I prefer being honest by saying it would be my first contribution to an Open Source project.
Hi @Azumix thank you for your interest.
I assign the issue to you.
If you need some initial notes about how to manage a Pull Request you can look here.
Feel free to ask for every doubt, me ( in these days I'm a little busy) or other java maintainer will answer ASAP
Thanks for your trust!
I already read the differents notes available and I have knowledge of git so it should be okay.
I'll try to set up my computer for work today and start working on the project tomorrow.
Already got one question.
The initial note say "It may be forked from C#". Would you prefer me to design the same exercise that exist in C# in Java or do you prefer I made a brand new exercise ? Both are good option to me.
@Azumix I think the easy way is to translate C# exercise in Java
Thanks for your answer @mirkoperillo !
If it's what you want, it's what I will do!
I ran into a blocking point during the csharp translation.
In C# it exists the case-when statement that is very usefull in the exercise (as it was first describe). However in Java we don't have that.
I can make a workaround using an enumeration and make the switch on that enumeration but I'm not sure that for someone trying to learn programming that this workaround will be something "obvious" / that they would think about as it's a bit tricky.
What do you think ? Do I make this workaround in my solution file or do I delete this part of the problem ?
The point here :
using the case-when in C# the user is authorized to make great condition in the switch (using object class or particular attribute) which is not possible in Java (for the class).
@Azumix thank you, now I got it.
What you think about remove the part not possible in Java ?
@mirkoperillo I think it's the easiest and most suitable way yes. In order to not confuse new programmer with not obvious workaround.
@mirkoperillo Pull Request here : #2270
Please tell me if I have to change something. I tried to follow all the rules I saw but I may have miss something.
EDIT : fix Prettier that I forgot to run at first... My bad... All checks passed now!
EDIT2 : I tried to link the PR to the issue using commit but it does not seems to work. I hope it does not make something to "dirty" in the git history. Sorry for that.
Should the folder be named case-statement as this issue mentionned it or should it base switch statement as the official Java-doc mention it?
I think the best thing is to rename it.
Thank you to work on it
Il sab 26 set 2020, 22:21 Emilyen Laffineur notifications@github.com ha
scritto:
Should the folder be named case-statement as this issue mentionned it or
should it base switch statement as the official Java-doc mention it?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/exercism/v3/issues/1963#issuecomment-699543576, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AA72QLP6UL27A34ITQC5UPTSHZENHANCNFSM4OYGC52Q
.