Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please slove quickly and use c++ Problem 3 (30 pts) A book normally has attributes like a title, number of pages, and a genre Horror,
please slove quickly and use c++
Problem 3 (30 pts) A book normally has attributes like a title, number of pages, and a genre "Horror", or "Sci-Fic"). You own 3 horror books and 5 sci-fi books. You decided to place a bookshelf in your room where it will hold your book collection. Your bookshelf can hold a maximum of 20 books, no more. Given the description above, please do the following: Create a Book class with its attributes, getters/setters functions. Optionally, you may include any suitable functions. o Create Book_Shelf class that is an array of objects for class books with the following methods: oint CountBooksByGenre(string genre). This function counts the number of books by a given genre. oint Count TotalBooks(). This function counts how many Books the Bookshelf has. oint CountRemaining Slots(). This function counts the number of free slots at the Bookshelf given that the maximum Bookshelf slots will be 20. o Test your code from your main function to create the objects for the classes, and to test the methods of the Bookshelf class and to display the results. Look up this URL for assistance: C++ array of objects: CodesDope Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started