(a) A book-shop maintains the inventory of books that are being sold…
Previous year question for Object Oriented Programming Using C++.
Question
(a) A book-shop maintains the inventory of books that are being sold at the shop. The list includes details such as author, title, price, publisher and stock position. Whenever a customer wants a book, the sales person inputs the title and author and the system searchers the list and displays whether it is available or not. If it is not, an appropriate message is displayed. If it is, the system displays the book details and requests for the number of copies required. If the requested copies are available, the total cost of the requested copies is displayed; otherwise the message "Required copies not in stock" is displayed.
Design a system using a class called books with suitable member functions and constructors. Use new operator in constructors to allocate memory space required.
(b) Using the concept of pointers write a function that swaps the private data values of two objects of the same class type.
- Year: 2018
- Subject: Object Oriented Programming Using C++