Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 2 - Assignment: This is a group assignment; each group has to select any one of the 2 lab assignments described in this section.
Part Assignment: This is a group assignment; each group has to select any one of the lab assignments described in this section. Task will be evaluated for a total of marks, out of it marks will be allocated for class participation and marks will be allocated for viva vocedemonstration of the work. A report needs to be submitted by each group in the week. Task should be implemented based on the concepts Array, function and structure. The date of submission will be notified through Blackboard. The description of the tasks is given below.
i A bookshop uses a personal computer to maintain the inventory books that are being sold at the shop. The list includes details such as author, title, price, publisher, stock position. Whenever a customer wants a book, the shop keeper inputs the title and the author of the book and the system replies whether it is in the list or not. If it is not in the list, an appropriate message is displayed. If book is in the list, then the system displays the book details and asks for number of copies. If the required copies are available, the total cost of the book is displayed; otherwise the message "Required copies not in stock is displayed.
Requirements:
Implement a structure named bookRecord with the following attributes:
Title string
Author string
ISBN string
Year of Publication integer
Price float
Quantity integer
Define a functions to operate on the book records for adding a new book in to the list.
Prompt the user to input details for the new book and add it to the array of books.
Update the number of books accordingly.
Define a functions to display the details of all books in the shop.
Define a functions to search for a book by its title and author of the book and display its details if found. Provide appropriate messages if the book is not found.
Define a function that calculates the total amount a customer must pay after buying a specified number of books from the bookstore.
Update the availability of the book accordingly.Write a main function to test your implementation. The main function should provide a menudriven interface allowing users to:QEAD Template ARev: ver Date: "October Page of FQAP
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