Skip to content

Implement new exercise: Zipper - #1327

Merged
Smarticles101 merged 5 commits into
exercism:masterfrom
LuLechuan:Implement_Zipper
Feb 21, 2018
Merged

Smarticles101 merged 5 commits into
exercism:masterfrom
LuLechuan:Implement_Zipper

Conversation

@LuLechuan

@LuLechuan LuLechuan commented Feb 20, 2018 •

Copy link
Copy Markdown
Contributor

Implement Zipper #1326
The reference file and test file are done.
However, I have some doubt for this exercise and would like to clarify before uploading README.md and config:
From the problem-description: https://github.com/exercism/problem-specifications/blob/master/exercises/zipper/description.md, there are operations such as prev (move the focus to the previous child of the same parent), next(move the focus to the next child of the same parent), insert before, insert after and delete but they are not tested in the canonical file?
On the other hand, there is no operations called setLeft() or setRight() in the problem description but they are tested extensively in the canonical file.
I have created all these functions in the reference files, please correct me if I have misunderstood these operations. Should I add the tests for those operations that are not in the canonical files?
Thanks for the clarification!


Reviewer Resources:

Track Policies

@sjwarner-bp sjwarner-bp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I personally think that the closer we stay to the canonical data, the better 🙂

It might be that these functions are mentioned but untested because there is a possibility the canonical data will be updated later with tests for them. If this is the case, we will open a new issue to update the tests when appropriate 👍

@LuLechuan

Copy link
Copy Markdown
Contributor Author

@sjwarner-bp Ok.
For the difficulty level, I found the implemented zipper in the python track is an 8, so I just follow that?

@sjwarner-bp

Copy link
Copy Markdown
Contributor

@LuLechuan it depends! Some exercises will be very similar across all language tracks, but others will be particularly easy in some languages and much harder in others.

You don't have to just copy Python's difficulty. You wrote a reference solution - how hard did you find that compared to any other exercism Java exercises you've completed? 🙂

@LuLechuan

Copy link
Copy Markdown
Contributor Author

@sjwarner-bp Well this question is an upgraded version for linked-list since they both use pointers in a list/tree. As linked-list is a 6, I would probably give this a 7.

@LuLechuan

Copy link
Copy Markdown
Contributor Author

Ready to be reviewed. Thanks

Zipper left;
Zipper right;

public Zipper(int val) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As per our POLICIES document, we should limit access to minimal levels.

In that case, we should change this (and other public methods) to package private.

@LuLechuan

Copy link
Copy Markdown
Contributor Author

@sjwarner-bp Changes made as requested

@sjwarner-bp sjwarner-bp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is looking pretty good to me! Thanks @LuLechuan

I'll leave it to see if @Smarticles101 has any suggestions that I've missed, but if there aren't any by tomorrow I'll happily merge this in 🎆

@LuLechuan

Copy link
Copy Markdown
Contributor Author

@sjwarner-bp Ok sure, thanks for the review!

@Smarticles101 Smarticles101 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks fine to me!

@Smarticles101
Smarticles101 merged commit 938fc0d into exercism:master Feb 21, 2018
@sjwarner-bp

Copy link
Copy Markdown
Contributor

Thanks for the new exercise @LuLechuan!

It's always great to bulk the track out a bit 🎉

@LuLechuan

Copy link
Copy Markdown
Contributor Author

Thanks @sjwarner-bp and @Smarticles101 ! It's nice to work with you.

hgvanpariya pushed a commit to hgvanpariya/java that referenced this pull request May 13, 2018
* Implement Zipper

* Update config

* Update readme

* Minor changes

* Update all methods to package private
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.

3 participants