Answered step by step
Verified Expert Solution
Link Copied!

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 2- Assignment: This is a group assignment; each group has to select any one of the 2 lab assignments described in this section. Task 2 will be evaluated for a total of 70 marks, out of it 5 marks will be allocated for class participation and 15 marks will be allocated for viva voce/demonstration of the work. A report needs to be submitted by each group in the 11th week. Task2 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 menu-driven interface allowing users to:QEAD- Template ARev: 04_ ver 02Date: 01"October 2018Page 2 of 4F/QAP/021/001
image text in transcribed

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

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

Students also viewed these Databases questions

Question

What is the relationship between humans and nature?

Answered: 1 week ago