In this project, we will create a console app that will help to keep a record of different types of things you own: books, music albums, movies, and games. Everything will be based on the given UML class diagram and the data will be stored in JSON files as well.
[ ] Create a Label class with an association to the Itemclass (in a separate .rb file).
[ ] All Bookclass properties visible in the diagram should be defined and set up in the constructor method.
[ ] All Labelclass properties visible in the diagram should be defined and set up in the constructor method.
[ ] Implement methods:
add_item method in the Labelclass
should take an instance of the Itemclass 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 Bookclass
should override the method from the parent class
should return true if parent's method returns true OR if _coverstate equals to "bad"
otherwise, it should return false
**Hi team,
I added the following:**
Label
class with an association to theItem
class (in a separate .rb file).Book
class properties visible in the diagram should be defined and set up in the constructor method.Label
class properties visible in the diagram should be defined and set up in the constructor method.add_item
method in theLabel
class should take an instance of theItem
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 theBook
class should override the method from the parent class should return true if parent's method returns true OR if _coverstate equals to "bad" otherwise, it should return false