Skip to content

Catalog of My things console app #46

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

Open
wants to merge 95 commits into
base: main
Choose a base branch
from
Open

Catalog of My things console app #46

wants to merge 95 commits into from

Conversation

yodit93
Copy link
Collaborator

@yodit93 yodit93 commented Jun 2, 2023

In this project, we

  • created classes based on the UML class diagram (https://github.com/microverseinc/curriculum-ruby/blob/main/group-capstone/images/catalog_of_my_things.png) in a separate file

  • implemented all associations (1-to-many relationships) and aggregations (parent-child relationships) between classes,

  • defined and set up all properties visible on the diagram in the constructor method.,

  • created a custom setter method for properties on 1-to-many relationships,

  • implemented all methods visible in the diagram,

  • add_item method (in all classes that have that method)

with an instance of the Item class as an input,
which adds the input item to the collection of items and,
add self as a property of the item object (by using the correct setter from the item object).

  • can_be_archived?() in the Item class

which returns true if published_date is older than 10 years.
otherwise, it should return false.

  • move_to_archive() in the Item class which

reuse can_be_archived?() method.
change the archived property to true if the result of the can_be_archived?() method is true.
should do nothing if the result of the can_be_archived?() method is false.

  • can_be_archived?() in the Book class which

overrides the method from the parent class.
returns true if parent's method returns true OR if cover_state equals to "bad".
otherwise, it should return false.

can_be_archived?() in the MusicAlbum class which

overrides the method from the parent class.
returns true if parent's method returns true AND if on_spotify equals true.
otherwise, it should return false.

  • can_be_archived?() in the Movie class which

overrides the method from the parent class,
returns true if parent's method returns true OR if silent equals true,
otherwise, it should return false.

  • can_be_archived?() in the Game class which

override the method from the parent class,.
returns true if parent's method returns true AND if last_played_at is older than 2 years,
otherwise, it should return false.

  • added unit tests for all implemented methods,
  • created a main.rb file that serves as a console app entry-point,
  • presented the user with a list of options to perform,

List all books
List all music albums
List all movies
List of games
List all genres
List all labels
List all authors
Create a book
Create a music album
Create a movie
Create a game

  • let users choose an option.
  • asked for parameters for the option if needed
  • implemented a method to quit the app,
  • preserved data by saving collections in .json files.
  • created a schema.sql file with tables that is analogical to the structure of the classes in the app.
  • added all properties and associations from the parent Item class as table columns to all tables based on the child classes.

Copy link

@KDlamini KDlamini left a comment

Choose a reason for hiding this comment

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

Hi team @yodit93, @brhanuhailu, @danielmatama 🙋‍♀️,

Great work so far! 💯
You have done a great job implementing all the project requirements for the Catalog of My Things Ruby capstone. 🎊 🥳
There are some issues that you still need to work on to improve your project according to the requirements. You are almost there! 💪🏾

HIGHLIGHTS 🌟

✔️ Good UI implementation
✔️ Good PR title and description
✔️ Class relationships and associations are included
✔️ Well-written unit tests
✔️ Well documented README

Video Presentation 🎥

✔️ There is a recorded presentation video presenting the features of the project with a maximum length of 5 minutes.
✔️ The video contains a clear and objective description of the project in professional English. The topic and purpose of the project are made clear.
✔️ The video contains a demo of the project, highlighting all the project features.
✔️ The video contains a highlight about a piece of the code the students finds interesting or are proud of making.

Required Changes ♻️

Kindly look through the comments below 👇 for required changes

Optional suggestions

Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you take them into account as they can make your code better.

Cheers 🥂 and Happy coding!!! 👯
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me @KDlamini in your question so I can receive the notification.

Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

Copy link

@KDlamini KDlamini Jun 2, 2023

Choose a reason for hiding this comment

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

[OPTIONAL] When working in teams it's always best to discuss the file structure or architecture of your application so that the is consistency and unity in the way that you implement features.

For example, one of your teammates used the src directory to organize their features while everyone else left their files in the root directory. This indicates disunity in the way you create and organize your application.

  • To have a consistent file structure it would be best if every team member also created dedicated directories in the src directory to organize their files. You could have the src/game directory for game and author, and src/book directory for book and label, and src/storage for storage and store files.

README.md Outdated
Comment on lines 4 to 6
<img src="microverse_logo.png" alt="logo" width="140" height="auto" />
<br/>
Copy link

Choose a reason for hiding this comment

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

To make your README more professional, it is best to not have broken images. If you do not have a project logo that you can use then remove the log tag completely.

image

item.rb Outdated
Comment on lines 26 to 29
def label=(label)
@label = label
label.add_item(self)
end
Copy link

@KDlamini KDlamini Jun 2, 2023

Choose a reason for hiding this comment

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

As stated in the project requirements, kindly ensure all associations (1-to-many relationships) are implemented. Please make sure the Item class is associated with the Genre and Author classes too as you did with Label in the Item class.

For example, here's how you can associate Genre.

genre

  • Kindly do the same for Author too. You can also optimize the Label association you implemented by adding the unless condition as illustrated in the example above to prevent duplication.

Copy link

Choose a reason for hiding this comment

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

Well done on your unit tests team!!! 💯💪🏾

Please note that the project requirements state that you should add unit tests for all implemented methods. That includes methods in the Item class too.

image

Kindly add unit tests for all methods in the Item class. This means

  • Write tests for the can_be_archived? and move_to_archive methods in the Item class
  • Write tests for the label setter method and check if setting a label with this method adds an item to the label.items array.
  • Write tests for the genre setter method and check if setting a genre with this method adds an item to the genre.items array. Note: You will have to create this missing method in the Item class as requested in one of the comments above.
  • Write tests for the author setter method and check if setting an author with this method adds an item to the author.items array. Note: You will have to create this missing method in the Item class as requested in one of the comments above.

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.

4 participants