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

Team member #1 #29

Merged
merged 12 commits into from
Nov 8, 2023
Merged

Team member #1 #29

merged 12 commits into from
Nov 8, 2023

Conversation

78fatemanazari
Copy link
Owner

Description

  • Create a Book class in a separate .rb file.
  • Create a Label class with an association to the Item class (in a separate .rb file).
  • All Book class properties visible in the diagram should be defined and set up in the constructor method.
  • All Label class properties visible in the diagram should be defined and set up in the constructor method.
  • Implement methods:
    • add_item method in the Label class
      • should take an instance of the Item class as an input
      • should add the input item to the collection of items
      • should add self as a property of the item object (by using the correct setter from the item object)
    • can_be_archived?() in the Book class
      • should override the method from the parent class
      • should return true if parent's method returns true OR if cover_state equals to "bad"
      • otherwise, it should return false
  • Add unit tests for all implemented methods.
  • The following options should be available:
    • List all books
    • List all labels (e.g. 'Gift', 'New')
    • Add a book
  • All data should be preserved by saving collections in .json files.
  • Create a schema.sql file with tables that will be analogical to the structure of the classes that you created:
    • books table (add all properties and associations from the parent Item class as table columns)
    • labels table

Copy link
Collaborator

@Rafiduzzaman Rafiduzzaman left a comment

Choose a reason for hiding this comment

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

STATUS: APPROVED

Hi @78fatemanazari

Your project is complete! There is nothing else to say other than... Great job 👏 Congratulations! 🎉

TO HIGHLIGHT:

  • Your project is professional ✅
  • Good Job 👍
  • Now you can merge this branch and move on 🥇 HAPPY CODING AND GOOD LUCK WITH THE COMING ONES 🤞

Optional suggestions:

N/A

Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer, and addressing them will really improve your application.

Feedback on the changes made in the PR description:

  1. Creating a separate .rb file for the Book and Label classes is a good organizational choice.
  2. Defining and setting up all Book and Label class properties in the constructor method is a good practice for clarity and consistency.
  3. The implementation of the add_item method in the Label class, which associates an item with a label, is a great addition to your project's functionality.
  4. Overriding the can_be_archived?() method in the Book class to include custom logic based on cover_state is a good design decision.
  5. Adding unit tests for all implemented methods is crucial for ensuring the reliability of your code.
  6. Saving collections in .json files to preserve data is a good choice for data persistence.
  7. Creating a schema.sql file to match the structure of your classes for database table creation is a solid approach.

Overall, this PR shows excellent progress and adherence to best practices. Keep up the good work, and happy coding! 👏 👏 👏

@Rafiduzzaman Rafiduzzaman merged commit fcd233c into dev Nov 8, 2023
2 checks passed
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