Skip to content
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

Added a c++ library for working with fractions. #1558

Merged
merged 18 commits into from
Oct 15, 2019

Conversation

Niraj-Kamdar
Copy link
Contributor

@Niraj-Kamdar Niraj-Kamdar commented Oct 10, 2019

Congrats on taking the first step to contributing to the Sample Programs repository maintained by The Renegade Coder! For simplicity, please make sure that your pull request includes one and only one contribution.

Complete the Applicable Sections Below

Find which section best describes your pull request and make sure you fill it out. To start, let us know which issue you've fixed.

  • I fixed #your-issue-number-here

Code Snippets

  • I named the pull request using Added/Updated <Sample Program> in <Language> format
  • I created/updated the language README
    • I added the sample program name to the README
    • I added fun facts (i.e. debut, developer, typing, etc.)
    • I added reference link(s) to the README
    • I added solution citations when necessary (see plagiarism)

Documentation

  • I named the pull request using Added/Updated <Sample Program> in <Language> Article format
  • I followed the applicable article template

Testing

  • I named the pull request using Added/Updated <Language>/<Project> Testing format
  • I followed the testinfo template, if applicable

Notes

Feel free to describe what you added or updated.

Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

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

Hey! This is really cool, but we currently don't have any support for it. Would you like to put the documentation together for this? See the projects page for examples.

@jrg94 jrg94 self-assigned this Oct 10, 2019
@jrg94 jrg94 added enhancement Any code that improves the repo hacktoberfest Hacktoberfest related labels Oct 10, 2019
@jrg94 jrg94 added this to the 500 Code Snippets milestone Oct 10, 2019
@jrg94
Copy link
Member

jrg94 commented Oct 10, 2019

This solution is a bit complicated, so I'll take a look shortly.

Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

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

Overall, I love the idea. However, libraries don't really fit well with our collections (though I'm open to the thoughts of others). If there's a way to make this runnable, that would be great!

featured-image:
tags: [c-plus-plus, fractions]
authors:
- niraj-kamdar
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I'm going to mention this again.

Copy link
Member

Choose a reason for hiding this comment

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

If you add yourself to the authors file, we'll be good to go.

bottom will be assigned to denometor.Here we checks if denometor is zeros then we throws an error and if denomenator is
negative then we negate top and bottom before assigning them.
We also have to implement getters for this Class and a method for unary operator `-`.
We also have to implement friend functions(one can use normal method) for binary operators like +, -, >=, == etc.
Copy link
Member

Choose a reason for hiding this comment

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

Here, we try to include a section for how to run the solution. It appears your solution is more of a library and less of an executable program.

docs/projects/fractions/index.md Show resolved Hide resolved
@jrg94
Copy link
Member

jrg94 commented Oct 10, 2019

I just noticed the main function! Any chance we could standardize it for user input?

@Niraj-Kamdar
Copy link
Contributor Author

I have changed main function as required.

Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

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

Much better! My only ask now is that you fix up the project description to match our typical template. In addition, I think you're missing a section in your article.

@Niraj-Kamdar
Copy link
Contributor Author

I don't know how to add article using syntax like this {% include article_list.md collection=site.categories.file-io %}.
so i am appending line -fill as needed to the article.

@jrg94
Copy link
Member

jrg94 commented Oct 14, 2019

Let me know when you think it's ready for review.

@Niraj-Kamdar
Copy link
Contributor Author

You can review it now. I guess i have completed all the requirements.

Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

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

Looks amazing! I'm really happy with how this turned out. Just a couple points.

featured-image:
tags: [c-plus-plus, fractions]
authors:
- niraj-kamdar
Copy link
Member

Choose a reason for hiding this comment

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

I'm going to mention this again.

docs/projects/fractions/_posts/2019-10-10-c-plus-plus.md Outdated Show resolved Hide resolved
docs/projects/fractions/index.md Outdated Show resolved Hide resolved
docs/projects/fractions/index.md Outdated Show resolved Hide resolved
Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

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

Looks just about ready! We just need you to add yourself to the authors file.

@Niraj-Kamdar
Copy link
Contributor Author

i have updated authors.yml

Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

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

Awesome! We're in good shape.

@jrg94 jrg94 merged commit 1a29ff9 into TheRenegadeCoder:master Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any code that improves the repo hacktoberfest Hacktoberfest related
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants