Write a C++ program (in OOP) with the following details: A class called Inventory, that will act as a Inventory of certa
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Write a C++ program (in OOP) with the following details: A class called Inventory, that will act as a Inventory of certa
Write a C++ program (in OOP) with the following details: A class called Inventory, that will act as a Inventory of certain books in a library. It contains the following: • Two private data members: book_ID (int) and available_current_no (int), which represents the no. of available books. • A Public functions add_books_no(), task is to add the number of added books from the current no. of that certain book • A Public functions sub_books_no(), task is to subtract the borrowed book from the current no. of the same books and print "Number of Books to be borrowed exceed the Total Available Books" if num_books_borrowed is more than available_current_no. A public function print_func(), which shall print "Book ID: xxx, Available =xxx" (e.g., Book ID: 356, Available =289). Also, add feature in the program that will ask the user to repeat or not the execution of the program.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!