Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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: o Create a Book class with its attributes, getters/setters functions. Optionally, you may include any suitable functions. 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. o int 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

3rd Edition

0760049041, 978-0760049044

More Books

Students also viewed these Databases questions

Question

Please use the dataset below

Answered: 1 week ago

Question

2 The main characteristics of the market system.

Answered: 1 week ago